#
267654 |
|
19-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
267415 |
|
12-Jun-2014 |
emaste |
MFC r266208: Speed up pmcstat by improving string hash
In one case generating callgraph output from a 24MB system-wide sampling data file took 17.4 seconds on average. Profiling showed pmcstat spending a lot of time in strcmp, due to hash collisions.
Replacing the XOR-only hash with FNV-1a reduces the run time for my test by 40%.
Approved by: re
|
#
237970 |
|
02-Jul-2012 |
obrien |
MFC: r227526: KNF
|
#
237969 |
|
02-Jul-2012 |
obrien |
MFC: r227524: improve the grep-ability output strings.
|
#
236998 |
|
13-Jun-2012 |
fabient |
MFC r236669: Remove spurious ARM symbols from lookup table.
|
#
236238 |
|
29-May-2012 |
fabient |
MFC r233628, r234598, r235229, r235831, r226986.
Add software PMC support.
New kernel events can be added at various location for sampling or counting. This will for example allow easy system profiling whatever the processor is with known tools like pmcstat(8).
Simultaneous usage of software PMC and hardware PMC is possible, for example looking at the lock acquire failure, page fault while sampling on instructions.
Sponsored by: NETASQ
|
#
235977 |
|
25-May-2012 |
fabient |
MFC r233611: - Support inlined location in calltree output. In case of multiple level of inlining all the locations are flattened. Require recent binutils/addr2line (head works or binutils from ports with the right $PATH order). - Multiple fixes in the calltree output (recursion case, ...) - Fix the calltree top view that previously hide some shared nodes.
Tested with Kcachegrind(kdesdk4)/qcachegrind(head).
Sponsored by: NETASQ
|
#
229392 |
|
03-Jan-2012 |
fabient |
MFC r226514,r226526,r226986: Add a flush of the current PMC log buffer before displaying the next top.
As the underlying block is 4KB if the PMC throughput is low the measurement will be reported on the next tick. pmcstat(8) use the modified flush API to reclaim current buffer before displaying next top.
|
#
225736 |
|
22-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
#
224698 |
|
07-Aug-2011 |
attilio |
Convert pmcstat about using cpuset_t rather than relying on plain 32 bit ints. That fixes a first bug where pmcstat wasn't using the old cpumask_t interface and now also brings the full support for more than 32 cpus.
While here, make the functions pmcstat_clone_event_descriptor() and pmcstat_get_cpumask() private to pmcstat.
The problem of assuming cpu dense masks still persists and should be eventually fixed, as reported by avg.
Tested by: pluknet Reviewed by: gnn Approved by: re (kib)
|
#
212176 |
|
03-Sep-2010 |
fabient |
When an asm location cannot be resolved to a function the cost will be spread as small value and then filtered by the threshold. As a first step solution display the number of event that cannot be resolved as a valid function location.
MFC after: 1week
|
#
210797 |
|
03-Aug-2010 |
fabient |
- Do not use the runtime mask when logfile is specified. - Revert the fix on rtld path that is not necessary.
MFC after: 1 week
|
#
210794 |
|
03-Aug-2010 |
fabient |
Allow file as a top source, it works with socket now. This will allow top monitoring using socket/ssh tunnelling of system without local symbols.
client: pmcstat -R <ip>:<port> -T -r <symbolspath> monitored device: pmcstat -Sinstructions -O <ip>:<port>
- Move the file read in the event loop - Initialize and clean log in all cases - Preserve global stats value during top refresh - Fix the rtld/line resolver that ignore '-r' prefix - Support socket for '-R' (server mode) - Display the statistics when exiting top mode
|
#
208858 |
|
05-Jun-2010 |
fabient |
Fix warnings found by Coverity.
Found with: Coverity Prevent(tm) MFC after: 1 month
|
#
207731 |
|
06-May-2010 |
fabient |
Exclude undefined symbol from ELF file when doing function resolve.
MFC after: 3 days
|
#
206635 |
|
14-Apr-2010 |
fabient |
Move fatal error at the right place. Fix exit from top mode when checking if PMC is available.
MFC after: 3 days
|
#
206090 |
|
02-Apr-2010 |
fabient |
Improve "top" header by: - Display sample received per PMCs (or merged PMCs). - Display percentage vs all samples
|
#
205809 |
|
28-Mar-2010 |
fabient |
Wait for pmc name in the log before displaying data. This will solve an abort in case of low throughput PMCs.
MFC after: 3days
|
#
204878 |
|
08-Mar-2010 |
fabient |
Change the way shutdown is handled for log file.
pmc_flush_logfile is now non-blocking and just ask the kernel to shutdown the file. From that point, no more data is accepted by the log thread and when the last buffer is flushed the file is closed.
This will remove a deadlock between pmcstat asking for flush while it cannot flush the pipe itself.
MFC after: 3 days
|
#
203790 |
|
11-Feb-2010 |
fabient |
- Reorganize code in 'plugin' to share log processing. - Kcachegrind (calltree) support with assembly/source code mapping and call count estimator (-F). - Top mode for calltree and callgraph plugin (-T).
MFC after: 1 month
|
#
201145 |
|
28-Dec-2009 |
antoine |
(S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument. Fix some wrong usages. Note: this does not affect generated binaries as this argument is not used.
PR: 137213 Submitted by: Eygene Ryabinkin (initial version) MFC after: 1 month
|
#
185322 |
|
25-Nov-2008 |
attilio |
Add the -m option to pmcstat. This option prints the list of sampled PCs along with the function name, the start and end addresses of this where their live within.
Reviewed by: jkoshy Tested by: gnn Sponsored by: Nokia
|
#
174396 |
|
07-Dec-2007 |
jkoshy |
Introduce pmcstat(8) changes for summarizing hwpmc(4) callchain records in in textual form and in gmon.out format.
Update manual page.
Sponsored by: FreeBSD Foundation and Google Inc.
|
#
174209 |
|
03-Dec-2007 |
jkoshy |
When printing the contents of a HWPMC log in human readable form: - Print a warning if the version number recorded in the log is not what the tool expects. - Print a tidier error message when an unrecognized event is encountered in the log. - Don't print a spurious 'Unknown error: 0' when exiting after a parse error.
|
#
157536 |
|
05-Apr-2006 |
jkoshy |
When printing a map, print the number of samples recorded by each gmon.out file.
MFC after: 1 week
|
#
157406 |
|
02-Apr-2006 |
jkoshy |
- Teach pmcstat(8) to log over the network; the -O option now takes a host:port specification. - Update the manual page and add an example showing how log over the network using pmcstat(8) and nc(1). Document the current inability to process logs in cross-platform manner. - Have pmcstat_open_log() call err(3) directly in case of an error; this simplifies error handling in its caller.
MFC after: 1 week
|
#
157144 |
|
26-Mar-2006 |
jkoshy |
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)
|
#
153710 |
|
25-Dec-2005 |
jkoshy |
When generating profiles (-g) warn about shared objects that were not found.
|
#
151434 |
|
18-Oct-2005 |
jkoshy |
Handle 32 bit executables better on AMD64 platforms.
|
#
150139 |
|
14-Sep-2005 |
jkoshy |
Determine where the runtime loader got mapped to when a dynamically linked process was exec()'ed, and map samples in that address range into the appropriate buckets in the runtime loader's profile. Improve a few comments.
MFC after: 3 days
|
#
150069 |
|
13-Sep-2005 |
jkoshy |
Fix a bug that caused generated gmon.out profiles to be out of whack. Use saturating arithmetic when incrementing a bucket. Improve a few comments.
MFC after: 3 days
|
#
147863 |
|
09-Jul-2005 |
jkoshy |
Fix a bug that affected on-the-fly gmon.out file generation.
Approved by: re (scottl)
|
#
147712 |
|
01-Jul-2005 |
jkoshy |
Unbreak tinderbox builds. Remove a debug printf.
Approved by: re (blanket hwpmc)
|
#
147708 |
|
30-Jun-2005 |
jkoshy |
MFP4:
- pmcstat(8) gprof output mode fixes:
lib/libpmc/pmclog.{c,h}, sys/sys/pmclog.h: + Add a 'is_usermode' field to the PMCLOG_PCSAMPLE event + Add an 'entryaddr' field to the PMCLOG_PROCEXEC event, so that pmcstat(8) can determine where the runtime loader /libexec/ld-elf.so.1 is getting loaded.
sys/kern/kern_exec.c: + Use a local struct to group the entry address of the image being exec()'ed and the process credential changed flag to the exec handling hook inside hwpmc(4).
usr.sbin/pmcstat/*: + Support "-k kernelpath", "-D sampledir". + Implement the ELF bits of 'gmon.out' profile generation in a new file "pmcstat_log.c". Move all log related functions to this file. + Move local definitions and prototypes to "pmcstat.h"
- Other bug fixes: + lib/libpmc/pmclog.c: correctly handle EOF in pmclog_read(). + sys/dev/hwpmc_mod.c: unconditionally log a PROCEXIT event to all attached PMCs when a process exits. + sys/sys/pmc.h: correct a function prototype. + Improve usage checks in pmcstat(8).
Approved by: re (blanket hwpmc)
|