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 /usr.sbin/pmcstat/pmcstat.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 'usr.sbin/pmcstat/pmcstat.h')
-rw-r--r-- | usr.sbin/pmcstat/pmcstat.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/pmcstat/pmcstat.h b/usr.sbin/pmcstat/pmcstat.h index f0246f9..c861f22 100644 --- a/usr.sbin/pmcstat/pmcstat.h +++ b/usr.sbin/pmcstat/pmcstat.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 @@ -93,14 +93,17 @@ struct pmcstat_ev { struct pmcstat_args { int pa_flags; /* argument flags */ int pa_required; /* required features */ + int pa_verbosity; /* verbosity level */ pid_t pa_pid; /* attached to pid */ FILE *pa_printfile; /* where to send printed output */ int pa_logfd; /* output log file */ char *pa_inputpath; /* path to input log */ char *pa_outputpath; /* path to output log */ void *pa_logparser; /* log file parser */ - const char *pa_kernel; /* pathname of the kernel */ + const char *pa_fsroot; /* FS root where executables reside */ + char *pa_kernel; /* pathname of the kernel */ const char *pa_samplesdir; /* directory for profile files */ + const char *pa_mapfilename;/* mapfile name */ double pa_interval; /* printing interval in seconds */ int pa_argc; char **pa_argv; @@ -111,17 +114,15 @@ struct pmcstat_args { void pmcstat_cleanup(struct pmcstat_args *_a); int pmcstat_close_log(struct pmcstat_args *_a); void pmcstat_initialize_logging(struct pmcstat_args *_a); -int pmcstat_open(const char *_p, int _mode); +int pmcstat_open_log(const char *_p, int _mode); void pmcstat_print_counters(struct pmcstat_args *_a); void pmcstat_print_headers(struct pmcstat_args *_a); void pmcstat_print_pmcs(struct pmcstat_args *_a); void pmcstat_setup_process(struct pmcstat_args *_a); void pmcstat_show_usage(void); -void pmcstat_shutdown_logging(void); +void pmcstat_shutdown_logging(struct pmcstat_args *_a); void pmcstat_start_pmcs(struct pmcstat_args *_a); void pmcstat_start_process(struct pmcstat_args *_a); int pmcstat_process_log(struct pmcstat_args *_a); -int pmcstat_print_log(struct pmcstat_args *_a); -int pmcstat_convert_log(struct pmcstat_args *_a); #endif /* _PMCSTAT_H_ */ |