summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pmcstat/pmcstat.8
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>2006-03-26 12:20:54 +0000
committerjkoshy <jkoshy@FreeBSD.org>2006-03-26 12:20:54 +0000
commit48e5e4792dd834813dd543cce68867e07d6c6d65 (patch)
treec2617fc6b46499b2b7e9b7d1145b96e592acedb1 /usr.sbin/pmcstat/pmcstat.8
parenta3688cc84e2cc795f00344b147ed53c98c15520e (diff)
downloadFreeBSD-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.8')
-rw-r--r--usr.sbin/pmcstat/pmcstat.846
1 files changed, 39 insertions, 7 deletions
diff --git a/usr.sbin/pmcstat/pmcstat.8 b/usr.sbin/pmcstat/pmcstat.8
index 369a39d..692216f 100644
--- a/usr.sbin/pmcstat/pmcstat.8
+++ b/usr.sbin/pmcstat/pmcstat.8
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2003 Joseph Koshy. All rights reserved.
+.\" Copyright (c) 2003-2006 Joseph Koshy. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -23,7 +23,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 1, 2005
+.Dd March 26, 2006
.Os
.Dt PMCSTAT 8
.Sh NAME
@@ -34,6 +34,7 @@
.Op Fl C
.Op Fl D Ar pathname
.Op Fl E
+.Op Fl M Ar mapfilename
.Op Fl O Ar logfilename
.Op Fl P Ar event-spec
.Op Fl R Ar logfilename
@@ -42,12 +43,15 @@
.Op Fl c Ar cpu
.Op Fl d
.Op Fl g
-.Op Fl k Ar kernelfile
+.Op Fl k Ar kerneldir
.Op Fl n Ar rate
.Op Fl o Ar outputfile
.Op Fl p Ar event-spec
+.Op Fl q
+.Op Fl r Ar fsroot
.Op Fl s Ar event-spec
.Op Fl t Ar pid
+.Op Fl v
.Op Fl w Ar secs
.Op Ar command Op Ar args
.Sh DESCRIPTION
@@ -116,6 +120,21 @@ complex pipeline of processes when used in conjunction with the
.Fl d
option.
The default is to not to enable per-process tracking.
+.It Fl M Ar mapfilename
+Write the mapping between executable objects encountered in the event
+log and the abbreviated pathnames used for
+.Xr gprof 1
+profiles to file
+.Ar mapfilename .
+If this option is not specified, mapping information is not written.
+Argument
+.Ar mapfilename
+may be a
+.Dq Li -
+in which case this mapping information is sent to the output
+file configured by the
+.Fl o
+option.
.It Fl O Ar logfilename
Send logging output to file
.Ar logfilename .
@@ -159,11 +178,14 @@ A separate profile file is generated for each executable object
encountered.
Profile files are placed in sub-directories named by their PMC
event name.
-.It Fl k Ar kernelfile
-Set the pathname of the kernel to argument
-.Ar kernelfile .
+.It Fl k Ar kerneldir
+Set the pathname of the kernel directory to argument
+.Ar kerneldir .
+This directory specifies where
+.Nm
+should look for the kernel and its modules.
The default is
-.Pa /boot/kernel/kernel .
+.Pa /boot/kernel .
.It Fl n Ar rate
Set the default sampling rate for subsequent sampling mode
PMCs specified on the command line.
@@ -179,6 +201,14 @@ The default is to send output to
Allocate a process mode counting PMC measuring hardware events
specified in
.Ar event-spec .
+.It Fl q
+Decrease verbosity.
+.It Fl r Ar fsroot
+Set the top of the filesystem hierarchy under which executables
+are located to argument
+.Ar fsroot .
+The default is
+.Pa / .
.It Fl s Ar event-spec
Allocate a system mode counting PMC measuring hardware events
specified in
@@ -189,6 +219,8 @@ Attach all process mode PMCs allocated to the process with PID
The option is not allowed in conjunction with specifying a
command using
.Ar command .
+.It Fl v
+Increase verbosity.
.It Fl w Ar secs
Print the values of all counting mode PMCs every
.Ar secs
OpenPOWER on IntegriCloud