mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Update.
* elf/sprof.c (load_profdata): If do_test provide information as to why loading failed. * elf/dl-profile.c (_dl_start_profile): Initialize all of hist_hdr.dimen.
This commit is contained in:
@@ -260,7 +260,11 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
|
||||
*(int32_t *) hist_hdr.hist_size = kcountsize / sizeof (HISTCOUNTER);
|
||||
*(int32_t *) hist_hdr.prof_rate = __profile_frequency ();
|
||||
if (sizeof (hist_hdr.dimen) >= sizeof ("seconds"))
|
||||
memcpy (hist_hdr.dimen, "seconds", sizeof ("seconds"));
|
||||
{
|
||||
memcpy (hist_hdr.dimen, "seconds", sizeof ("seconds"));
|
||||
memset (hist_hdr.dimen + sizeof ("seconds"), '\0',
|
||||
sizeof (hist_hdr.dimen) - sizeof ("seconds"));
|
||||
}
|
||||
else
|
||||
strncpy (hist_hdr.dimen, "seconds", sizeof (hist_hdr.dimen));
|
||||
hist_hdr.dimen_abbrev = 's';
|
||||
|
Reference in New Issue
Block a user