coredump: measure the system's running time in milliseconds unit

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
This commit is contained in:
wanggang26 2024-08-21 11:26:28 +08:00 committed by Xiang Xiao
parent d347da10ca
commit 848b596a12
2 changed files with 5 additions and 5 deletions

View File

@ -51,10 +51,10 @@
struct coredump_info_s
{
uint32_t magic;
struct utsname name;
time_t time;
size_t size;
uint32_t magic;
struct utsname name;
struct timespec time;
size_t size;
};
/****************************************************************************

View File

@ -720,7 +720,7 @@ static void coredump_dump_blkdev(pid_t pid)
info->magic = COREDUMP_MAGIC;
info->size = g_blockstream.common.nput;
info->time = time(NULL);
clock_gettime(CLOCK_REALTIME, &info->time);
uname(&info->name);
ret = g_blockstream.inode->u.i_bops->write(g_blockstream.inode,
(FAR void *)info, g_blockstream.geo.geo_nsectors - nsectors, nsectors);