coredump: measure the system's running time in milliseconds unit
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
This commit is contained in:
parent
d347da10ca
commit
848b596a12
|
@ -51,10 +51,10 @@
|
||||||
|
|
||||||
struct coredump_info_s
|
struct coredump_info_s
|
||||||
{
|
{
|
||||||
uint32_t magic;
|
uint32_t magic;
|
||||||
struct utsname name;
|
struct utsname name;
|
||||||
time_t time;
|
struct timespec time;
|
||||||
size_t size;
|
size_t size;
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
|
@ -720,7 +720,7 @@ static void coredump_dump_blkdev(pid_t pid)
|
||||||
|
|
||||||
info->magic = COREDUMP_MAGIC;
|
info->magic = COREDUMP_MAGIC;
|
||||||
info->size = g_blockstream.common.nput;
|
info->size = g_blockstream.common.nput;
|
||||||
info->time = time(NULL);
|
clock_gettime(CLOCK_REALTIME, &info->time);
|
||||||
uname(&info->name);
|
uname(&info->name);
|
||||||
ret = g_blockstream.inode->u.i_bops->write(g_blockstream.inode,
|
ret = g_blockstream.inode->u.i_bops->write(g_blockstream.inode,
|
||||||
(FAR void *)info, g_blockstream.geo.geo_nsectors - nsectors, nsectors);
|
(FAR void *)info, g_blockstream.geo.geo_nsectors - nsectors, nsectors);
|
||||||
|
|
Loading…
Reference in New Issue