mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-10 05:03:06 +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:
@@ -1,5 +1,10 @@
|
|||||||
2002-02-23 Ulrich Drepper <drepper@redhat.com>
|
2002-02-23 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
* csu/set-init.c: Moved to...
|
* csu/set-init.c: Moved to...
|
||||||
* sysdeps/mach/hurd/set-init.c: ...here. New file.
|
* sysdeps/mach/hurd/set-init.c: ...here. New file.
|
||||||
* csu/Makefile: Don't compile set-init.
|
* csu/Makefile: Don't compile set-init.
|
||||||
|
@@ -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.hist_size = kcountsize / sizeof (HISTCOUNTER);
|
||||||
*(int32_t *) hist_hdr.prof_rate = __profile_frequency ();
|
*(int32_t *) hist_hdr.prof_rate = __profile_frequency ();
|
||||||
if (sizeof (hist_hdr.dimen) >= sizeof ("seconds"))
|
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
|
else
|
||||||
strncpy (hist_hdr.dimen, "seconds", sizeof (hist_hdr.dimen));
|
strncpy (hist_hdr.dimen, "seconds", sizeof (hist_hdr.dimen));
|
||||||
hist_hdr.dimen_abbrev = 's';
|
hist_hdr.dimen_abbrev = 's';
|
||||||
|
14
elf/sprof.c
14
elf/sprof.c
@@ -752,9 +752,21 @@ load_profdata (const char *name, struct shobj *shobj)
|
|||||||
sizeof (struct gmon_hist_hdr)) != 0
|
sizeof (struct gmon_hist_hdr)) != 0
|
||||||
|| narcsp[-1] != GMON_TAG_CG_ARC)
|
|| narcsp[-1] != GMON_TAG_CG_ARC)
|
||||||
{
|
{
|
||||||
free (result);
|
|
||||||
error (0, 0, _("`%s' is no correct profile data file for `%s'"),
|
error (0, 0, _("`%s' is no correct profile data file for `%s'"),
|
||||||
name, shobj->name);
|
name, shobj->name);
|
||||||
|
if (do_test)
|
||||||
|
{
|
||||||
|
if (memcmp (addr, &gmon_hdr, sizeof (struct gmon_hdr)) != 0)
|
||||||
|
puts ("gmon_hdr differs");
|
||||||
|
if (*(uint32_t *) result->hist != GMON_TAG_TIME_HIST)
|
||||||
|
puts ("result->hist differs");
|
||||||
|
if (memcmp (result->hist_hdr, &hist_hdr,
|
||||||
|
sizeof (struct gmon_hist_hdr)) != 0)
|
||||||
|
puts ("hist_hdr differs");
|
||||||
|
if (narcsp[-1] != GMON_TAG_CG_ARC)
|
||||||
|
puts ("narcsp[-1] differs");
|
||||||
|
}
|
||||||
|
free (result);
|
||||||
munmap (addr, st.st_size);
|
munmap (addr, st.st_size);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user