mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
*** empty log message ***
Thu Sep 5 13:18:25 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * sysdeps/mach/hurd/i386/init-first.c (__libc_argc, __libc_argv): New variables. (init1): Initialize them. * hurd/hurdinit.c (_hurd_setproc): Now that happens to be available, pass __libc_argv in call to __proc_set_arg_locations. * gmon/gmon.c (write_hist): Call __profile_frequency instead of hertz. (hertz): Delete function. * gmon/Makefile (routines): Add `prof-freq'. * sysdeps/generic/prof-freq.c: New file. * sysdeps/mach/hurd/prof-freq.c: New (stubby) file. * sysdeps/mach/hurd/profil.c (profile_tick): New variable. (update_waiter): Store frequency in profile_tick. (__profile_frequency): New function. * sysdeps/mach/hurd/sendto.c (sendto): Use prototype definition syntax. * Rules (generated): Restore reference to $(generated). * mach/Machrules (mig.uh, mig.__h): Don't include $(user-MIGFLAGS) here. * malloc/free.c (free): __lib_malloc_lock -> __libc_malloc_lock. * malloc/free.c: Provide extern decl of __libc_malloc_lock. * malloc/realloc.c: Likewise. * malloc/malloc-find.c: Likewise. * malloc/malloc-size.c: Likewise. * malloc/malloc-walk.c: Likewise. * malloc/memalign.c: Likewise. * mach/Machrules (mig.uh, mig.__h): Include $(user-MIGFLAGS) and
This commit is contained in:
23
gmon/gmon.c
23
gmon/gmon.c
@ -57,27 +57,6 @@ static int s_scale;
|
||||
|
||||
#define ERR(s) write(2, s, sizeof(s) - 1)
|
||||
|
||||
/*
|
||||
* Discover the tick frequency of the machine if something goes wrong,
|
||||
* we return 0, an impossible hertz.
|
||||
*/
|
||||
static int
|
||||
DEFUN_VOID(hertz)
|
||||
{
|
||||
struct itimerval tim;
|
||||
|
||||
tim.it_interval.tv_sec = 0;
|
||||
tim.it_interval.tv_usec = 1;
|
||||
tim.it_value.tv_sec = 0;
|
||||
tim.it_value.tv_usec = 0;
|
||||
setitimer(ITIMER_REAL, &tim, 0);
|
||||
setitimer(ITIMER_REAL, 0, &tim);
|
||||
if (tim.it_interval.tv_usec < 2)
|
||||
return 0;
|
||||
return (1000000 / tim.it_interval.tv_usec);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Control profiling
|
||||
* profiling is what mcount checks to see if
|
||||
@ -183,7 +162,7 @@ DEFUN(write_hist, (fd), int fd)
|
||||
if (_gmonparam.kcountsize > 0)
|
||||
{
|
||||
size = _gmonparam.kcountsize / sizeof(HISTCOUNTER);
|
||||
rate = hertz();
|
||||
rate = __profile_frequency();
|
||||
bcopy(&_gmonparam.lowpc, &thdr.low_pc, sizeof(thdr.low_pc));
|
||||
bcopy(&_gmonparam.highpc, &thdr.high_pc, sizeof(thdr.high_pc));
|
||||
bcopy(&size, &thdr.hist_size, sizeof(thdr.hist_size));
|
||||
|
Reference in New Issue
Block a user