diff options
author | jkoshy <jkoshy@FreeBSD.org> | 2006-03-26 12:20:54 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 2006-03-26 12:20:54 +0000 |
commit | 48e5e4792dd834813dd543cce68867e07d6c6d65 (patch) | |
tree | c2617fc6b46499b2b7e9b7d1145b96e592acedb1 /lib/libpmc/pmclog.h | |
parent | a3688cc84e2cc795f00344b147ed53c98c15520e (diff) | |
download | FreeBSD-src-48e5e4792dd834813dd543cce68867e07d6c6d65.zip FreeBSD-src-48e5e4792dd834813dd543cce68867e07d6c6d65.tar.gz |
MFP4: Support for profiling dynamically loaded objects.
Kernel changes:
Inform hwpmc of executable objects brought into the system by
kldload() and mmap(), and of their removal by kldunload() and
munmap(). A helper function linker_hwpmc_list_objects() has been
added to "sys/kern/kern_linker.c" and is used by hwpmc to retrieve
the list of currently loaded kernel modules.
The unused `MAPPINGCHANGE' event has been deprecated in favour
of separate `MAP_IN' and `MAP_OUT' events; this change reduces
space wastage in the log.
Bump the hwpmc's ABI version to "2.0.00". Teach hwpmc(4) to
handle the map change callbacks.
Change the default per-cpu sample buffer size to hold
32 samples (up from 16).
Increment __FreeBSD_version.
libpmc(3) changes:
Update libpmc(3) to deal with the new events in the log file; bring
the pmclog(3) manual page in sync with the code.
pmcstat(8) changes:
Introduce new options to pmcstat(8): "-r" (root fs path), "-M"
(mapfile name), "-q"/"-v" (verbosity control). Option "-k" now
takes a kernel directory as its argument but will also work with
the older invocation syntax.
Rework string handling in pmcstat(8) to use an opaque type for
interned strings. Clean up ELF parsing code and add support for
tracking dynamic object mappings reported by a v2.0.00 hwpmc(4).
Report statistics at the end of a log conversion run depending
on the requested verbosity level.
Reviewed by: jhb, dds (kernel parts of an earlier patch)
Tested by: gallatin (earlier patch)
Diffstat (limited to 'lib/libpmc/pmclog.h')
-rw-r--r-- | lib/libpmc/pmclog.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/libpmc/pmclog.h b/lib/libpmc/pmclog.h index bc3c476..90fb193 100644 --- a/lib/libpmc/pmclog.h +++ b/lib/libpmc/pmclog.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 Joseph Koshy + * Copyright (c) 2005-2006 Joseph Koshy * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,14 +49,18 @@ struct pmclog_ev_initialize { uint32_t pl_arch; }; -struct pmclog_ev_mappingchange { - uint32_t pl_type; +struct pmclog_ev_map_in { pid_t pl_pid; uintfptr_t pl_start; - uintfptr_t pl_end; char pl_pathname[PATH_MAX]; }; +struct pmclog_ev_map_out { + pid_t pl_pid; + uintfptr_t pl_start; + uintfptr_t pl_end; +}; + struct pmclog_ev_pcsample { uintfptr_t pl_pc; pid_t pl_pid; @@ -124,7 +128,8 @@ struct pmclog_ev { struct pmclog_ev_closelog pl_cl; struct pmclog_ev_dropnotify pl_dn; struct pmclog_ev_initialize pl_i; - struct pmclog_ev_mappingchange pl_m; + struct pmclog_ev_map_in pl_mi; + struct pmclog_ev_map_out pl_mo; struct pmclog_ev_pcsample pl_s; struct pmclog_ev_pmcallocate pl_a; struct pmclog_ev_pmcattach pl_t; |