summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pmcstat
Commit message (Collapse)AuthorAgeFilesLines
* Fix the date on the pmcstat(8) man page from r291016.jtl2015-11-181-1/+1
| | | | | | | Approved by: gnn (mentor) MFC after: 1 month X-MFC with: r291016 Pointy hat to: jtl
* Support a wider history counter in pmcstat(8) gmon outputjtl2015-11-184-14/+64
| | | | | | | | | | | | | | | | | pmcstat(8) contains an option to output sampling data in a gmon format compatible with gprof(1). Currently, it uses the default histcounter, which is an (unsigned short). With large sets of sampling data, it is possible to overflow the maximum value provided by an (unsigned short). This change adds the -e argument to pmcstat. If -e and -g are both specified, pmcstat will use a histcounter type of uint64_t. Differential Revision: https://reviews.freebsd.org/D4151 Reviewed by: jhb, bjk Approved by: gnn (mentor) MFC after: 1 month Sponsored by: Juniper Networks
* Change the driver stats to what they really are: unsigned values.jtl2015-11-161-4/+14
| | | | | | | | | | | When pmcstat exits after some samples were dropped, give the user an idea of how many were lost. (Granted, these are global numbers, but they may still help quantify the scope of the loss.) Differential Revision: https://reviews.freebsd.org/D4123 Approved by: gnn (mentor) MFC after: 1 month Sponsored by: Juniper Networks
* Fix for r288176 changes related to debug symbols move.fabient2015-10-081-4/+15
| | | | | Reviewed by: emaste Sponsored by: Stormshield
* Fix an off by one error in r283613: Like regular ffs(), CPU_FFS() returnsjhb2015-09-011-1/+1
| | | | | | | | 1 for CPU 0, etc. so the return value must be decremented to obtain the first valid CPU ID. Submitted by: fabient MFC after: 1 week
* Add META_MODE support.sjg2015-06-131-0/+23
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-274-36/+50
| |\
| * \ Merge from head@274682sjg2014-11-191-2/+8
| |\ \
| * \ \ Merge head from 7/28sjg2014-08-196-12/+59
| |\ \ \
| * | | | Updated dependenciessjg2014-05-161-1/+0
| | | | |
| * | | | Updated dependenciessjg2014-05-101-0/+2
| | | | |
| * | | | Merge from headsjg2014-05-082-2/+18
| |\ \ \ \
| * \ \ \ \ Merge headsjg2014-04-286-3/+188
| |\ \ \ \ \
| * | | | | | Updated dependenciessjg2013-03-111-0/+1
| | | | | | |
| * | | | | | Updated dependenciessjg2013-02-161-2/+0
| | | | | | |
| | | | | | |
| | \ \ \ \ \
| | \ \ \ \ \
| | \ \ \ \ \
| *---. \ \ \ \ \ Sync from headsjg2012-11-045-17/+27
| |\ \ \ \ \ \ \ \
| * | | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | | | Use the cpuset API more consistently:jhb2015-05-272-30/+21
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fetch the root set from cpuset_getaffinity() instead of assuming all CPUs from 0 to hw.ncpu are the root set. - Use CPU_SETSIZE and CPU_FFS. - The original notion of halted CPUs the manpage and code refers to is gone. Use the term "available" instead. Differential Revision: https://reviews.freebsd.org/D2491 Reviewed by: emaste MFC after: 1 week
* | | | | | | | | Fix pmcstat symbol resolution for userland processes.stas2015-05-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When examining existing processes pmcstat fails to correctly determine the locations of executable sections of the process due to a miscalculated virtual load address. This does not affect the newly launched processes as the same value passed as a "start address" to the pmcstat_image_link() thus nullifying the effect of it. The issue manifests itself in processes not being reported in the pmcstat(8) output and "dubious frames" being reported. Fix it for now by ignoring all the sections except the executable one. This won't fix the issue for objects with multiple executable sections but helps in majority of real world usecases. The real solution would be to modify the MAP-IN event to include the appropriate load address so pmcstat(8) won't have to manually parse object files to try to determine it. PR: 198147, 198148 Reviewed by: jhb, rpaulo MFC after: 2 weeks
* | | | | | | | | Fix the double space in comment.stas2015-05-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While here, change the comment style to match the rest of the file.
* | | | | | | | | Use the kern.bootfile sysctl to set the default kernel path rather thanjhb2015-05-082-30/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hardcoding /boot/kernel. This allows pmcstat(8) to work without -k when using nextboot -k or 'boot foo' at the loader to boot alternate kernels. Differential Revision: https://reviews.freebsd.org/D2425 Reviewed by: adrian, emaste, gnn MFC after: 2 weeks Sponsored by: Norse Corp, Inc.
* | | | | | | | | pmcstat.8: fix -a flag description; improve -m flag to matchvangyzen2015-03-282-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -a flag reads a file saved by -O, not -o. The -m flag requires the -R flag. Copy that paragraph from -a. Reviewed by: adrian Approved by: kib (mentor) MFC after: 1 week Sponsored by: Dell Inc
* | | | | | | | | Convert usr.sbin to LIBADDbapt2014-11-251-2/+1
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking
* | | | | | | | Fix renderingbapt2014-10-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: brueffer
* | | | | | | | Clarify the documentation of pmcstat:bapt2014-10-271-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the -d argument should be passed before -p, -s, -P or -S to be taken in account Differential Revision: https://reviews.freebsd.org/D1011 Reviewed by: adrian, gnn MFC after: 1 week
* | | | | | | | mdoc: kill EOL whitespace.joel2014-07-291-1/+1
| |_|_|_|_|_|/ |/| | | | | |
* | | | | | | Replace all uses of libncurses and libtermcap with their wide characterbrooks2014-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variants. This allows usable file system images (i.e. those with both a shell and an editor) to be created with only one copy of the curses library. Exp-run: antoine PR: 189842 Discussed with: bapt Sponsored by: DARPA, AFRL
* | | | | | | use .Mt to mark up email addresses consistently (part2)bapt2014-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de>
* | | | | | | Update default callchain depth to 16 to match kernelemaste2014-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 1 week
* | | | | | | Update the date on the manual page.gnn2014-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pointed out by: bz
* | | | | | | Add a command line argument (-l) to end event collection after somegnn2014-05-163-3/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | number of seconds. The number of seconds may be a fraction. Submitted by: Julien Charbon <jcharbon@versign.com> MFC after: 2 weeks Relnotes: yes
* | | | | | | Speed up pmcstat by improving string hashemaste2014-05-161-3/+3
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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%.
* | | | | | Fix formatting of the -a option in usage() to be consistent.scottl2014-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obtained from: Netflix, Inc. MFC after: 3 days
* | | | | | Document the -a option that was added in r262424.scottl2014-04-291-1/+17
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | Obtained from: Netflix, Inc. MFC after: 3 days
* | | | | Add correct attributions.adrian2014-02-242-0/+2
| | | | | | | | | | | | | | | | | | | | Sponsored by: Netflix, Inc.
* | | | | Add a new option - 'a <file>' - which spits out annotated callgraphs.adrian2014-02-246-3/+186
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '-m <file>' spits out the given stream into <file> (eg, /dev/stdout). However, it only resolves the first symbol; it doesn't parse the entire callgraph. If it fails to lookup then it doesn't print anything. '-a' instead does a symbol and file:line lookup for each address in each callgraph and will happily print the address itself with no lookup information if it couldn't look things up. This makes it much easier to pull out individual records from a pmc data file and look at the callgraph information without having to hand-decode the addresses. Sponsored by: Netflix, Inc.
* | | | More -Wmissing-variable-declarations fixes.ed2012-10-194-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
* | | | Add -m option (for printing sampled PCs to a file) to pmcstat usagejimharris2012-08-221-0/+1
| |/ / |/| | | | | | | | | | | | | | | | | message. Sponsored by: Intel MFC after: 3 days
* | | Remove spurious ARM symbols from lookup table.fabient2012-06-061-0/+8
| |/ |/| | | | | MFC after: 3 days
* | Don't crash trying to load symbols from striped file.glebius2012-06-051-0/+2
| | | | | | | | | | | | PR: bin/167361 Submitted by: Slawa Olhovchenkov <slw zxy.spb.ru> Silence from: jkoshy
* | Minor spelling fixes.joel2012-06-031-1/+1
|/
* Add software PMC support.fabient2012-03-281-0/+15
| | | | | | | | | | | | | 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 MFC after: 1 month
* - Support inlined location in calltree output.fabient2012-03-282-241/+402
| | | | | | | | | | | | 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
* mdoc: correct .Bd/.Bl arguments.joel2012-03-261-1/+1
| | | | Reviewed by: brueffer
* Fix base vaddr detection for ELF binaries. PT_LOAD with offset 0 is notgonzo2012-03-221-2/+2
| | | | | mandatory for ELF binaries so we'll use the segment with offset less then alignment and align it appropriately (which covers pt_offset == 0 case)
* Fix warning when compiling with gcc46:eadler2012-01-201-2/+1
| | | | | | | error: variable 'current_cpu' set but not used Approved by: dim, cperciva (mentor, blanket for pre-mentorship already-approved commits) MFC after: 3 days
* Spelling fixes for usr.sbin/uqs2011-12-304-4/+4
|
* KNFobrien2011-11-151-16/+17
|
* Improve the chances of matching an outputted string with the line of code.obrien2011-11-154-122/+151
|
OpenPOWER on IntegriCloud