Commit Graph

146 Commits

Author SHA1 Message Date
George V. Neville-Neil
1cb3ec2eb7 Update the date on the manual page.
Pointed out by: bz
2014-05-18 15:31:53 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
George V. Neville-Neil
72fe532cd6 Add a command line argument (-l) to end event collection after some
number of seconds.  The number of seconds may be a fraction.

Submitted by:	Julien Charbon <jcharbon@versign.com>
MFC after:	2 weeks
Relnotes:	yes
2014-05-16 03:18:09 +00:00
Ed Maste
dc17b1feaa 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%.
2014-05-16 03:05:53 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Scott Long
5ae1451da6 Fix formatting of the -a option in usage() to be consistent.
Obtained from:	Netflix, Inc.
MFC after:	3 days
2014-04-29 07:19:22 +00:00
Scott Long
f6f851a37b Document the -a option that was added in r262424.
Obtained from:	Netflix, Inc.
MFC after:	3 days
2014-04-29 07:17:33 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Adrian Chadd
33d6df9acb Add correct attributions.
Sponsored by:	Netflix, Inc.
2014-02-24 02:47:47 +00:00
Adrian Chadd
85ec49f339 Add a new option - 'a <file>' - which spits out annotated callgraphs.
'-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.
2014-02-24 02:43:58 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Ed Schouten
bf70becee6 More -Wmissing-variable-declarations fixes.
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'.
2012-10-19 14:49:42 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Jim Harris
33b12a8557 Add -m option (for printing sampled PCs to a file) to pmcstat usage
message.

Sponsored by: Intel
MFC after: 3 days
2012-08-22 19:02:07 +00:00
Fabien Thomas
d13b0c3f27 Remove spurious ARM symbols from lookup table.
MFC after:	3 days
2012-06-06 08:58:31 +00:00
Gleb Smirnoff
b170d8208a Don't crash trying to load symbols from striped file.
PR:		bin/167361
Submitted by:	Slawa Olhovchenkov <slw zxy.spb.ru>
Silence from:	jkoshy
2012-06-05 20:08:59 +00:00
Joel Dahl
8972c8b6a5 Minor spelling fixes. 2012-06-03 11:29:48 +00:00
Fabien Thomas
f5f9340b98 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
MFC after:	1 month
2012-03-28 20:58:30 +00:00
Fabien Thomas
fa18b0b2fa - 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
2012-03-28 16:23:40 +00:00
Joel Dahl
46355096e1 mdoc: correct .Bd/.Bl arguments.
Reviewed by:	brueffer
2012-03-26 21:22:53 +00:00
Oleksandr Tymoshenko
a4b7818ee6 Fix base vaddr detection for ELF binaries. PT_LOAD with offset 0 is not
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)
2012-03-22 17:44:36 +00:00
Eitan Adler
831b96303a Fix warning when compiling with gcc46:
error: variable 'current_cpu' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:37:56 +00:00
Ulrich Spörlein
3df5ecac8c Spelling fixes for usr.sbin/ 2011-12-30 10:58:14 +00:00
David E. O'Brien
d6b6324f02 KNF 2011-11-15 06:50:10 +00:00
David E. O'Brien
37d6f8a9e6 Improve the chances of matching an outputted string with the line of code. 2011-11-15 06:44:07 +00:00
Eitan Adler
3b6dc18ef5 - fix duplicate "a a" in some comments
Submitted by:	eadler
Approved by:	simon
MFC after:	3 days
2011-11-13 17:06:33 +00:00
Fabien Thomas
66ce99369a Two bugs fixed:
- Do not close stdout or stderr when redirecting to file.
- Correctly handle error code to detect when no buffer available.

MFC after:	1 month
2011-11-01 09:28:47 +00:00
Fabien Thomas
dceed24a7c 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.

MFC after:	1 month
2011-10-18 15:25:43 +00:00
Attilio Rao
ea056888f5 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)
2011-08-07 18:37:05 +00:00
Andriy Gapon
44735e89b3 pmcstat, pmccontrol: catch up with removal of machdep.hlt_cpus sysctl
Reported by:	Pan Tsu <inyaoo@gmail.com>
Reviewed by:	attilio
No objections:	gnn
2011-07-15 11:30:41 +00:00
Kevin Lo
fdb6437f73 Remove duplicated header files 2011-06-24 07:05:20 +00:00
Fabien Thomas
eb707d6039 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
2010-09-03 13:54:02 +00:00
Fabien Thomas
e7ef1de5be - Do not use the runtime mask when logfile is specified.
- Revert the fix on rtld path that is not necessary.

MFC after:	1 week
2010-08-03 13:46:25 +00:00
Fabien Thomas
ac708fddbf 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
2010-08-03 09:23:53 +00:00
Fabien Thomas
46514c7783 Fix the calltree top view that incorrectly filter out some nodes.
MFC after:	1 week
2010-08-02 13:40:19 +00:00
Fabien Thomas
5c15d3c87e Fix warnings found by Coverity.
Found with:   Coverity Prevent(tm)
MFC after:	1 month
2010-06-05 22:57:53 +00:00
Fabien Thomas
782434abe5 Rework the calltree top view by critical callchain.
The percentage show is the sum of the cost for the codepath.

MFC after: 1 week
2010-05-07 19:48:50 +00:00
Fabien Thomas
176755d33e Exclude undefined symbol from ELF file when doing function resolve.
MFC after: 3 days
2010-05-06 20:54:19 +00:00
Fabien Thomas
cb5a415375 Apply threshold filter to root node in calltree view.
MFC after: 3days
2010-04-21 11:50:13 +00:00
Fabien Thomas
410c766274 Move fatal error at the right place.
Fix exit from top mode when checking if PMC is available.

MFC after: 3 days
2010-04-14 21:53:27 +00:00
Ulrich Spörlein
aa12cea2cc mdoc: order prologue macros consistently by Dd/Dt/Os
Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by:	ru
Approved by:	philip, ed (mentors)
2010-04-14 19:08:06 +00:00
Fabien Thomas
c86819ec59 Improve "top" header by:
- Display sample received per PMCs (or merged PMCs).
- Display percentage vs all samples
2010-04-02 13:34:28 +00:00
Fabien Thomas
9ba84a88b8 Wait for pmc name in the log before displaying data.
This will solve an abort in case of low throughput PMCs.

MFC after: 3days
2010-03-28 22:46:56 +00:00
Fabien Thomas
75109b48f4 Do not overflow the term in the case of multi-line display.
MFC after: 3days
2010-03-26 14:29:57 +00:00
Fabien Thomas
b44906e506 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
2010-03-08 19:58:00 +00:00
Fabien Thomas
2aa983e5ad Bug fixed:
- no display on serial terminal in top mode.
- display alignment for continuation string.
- correct invalid value used for display limit.

MFC after:	3 days
2010-03-05 23:08:19 +00:00
Ruslan Ermilov
bee10047c0 Fixed dependencies (make checkdpadd). 2010-02-25 20:24:19 +00:00
Fabien Thomas
0b86b1bb01 - 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
2010-02-11 22:51:44 +00:00
Ed Schouten
71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Antoine Brodin
13e403fdea (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
2009-12-28 22:56:30 +00:00
Joseph Koshy
a2c0b3aead Catch up with the times: "mozilla" -> "firefox". 2009-06-02 04:45:56 +00:00
Joseph Koshy
8cfb4353c2 Close the read side of the pipe to self when exiting. 2008-12-23 12:08:06 +00:00
Attilio Rao
c0252222a2 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
2008-11-25 23:24:29 +00:00
Joseph Koshy
b8fbd97b35 As a matter of good programming style, stop PMCs before releasing
them.
2008-11-19 02:22:34 +00:00
Joseph Koshy
5477328d81 - Avoid a spurious error when a command line is specified without
any process scope PMCs.
- Change the -c '*' option to denote non-halted CPUs.
2008-10-07 17:28:52 +00:00
Joseph Koshy
67442c6e80 Bring the usage message in sync with the manual page. 2008-09-19 14:51:41 +00:00
Joseph Koshy
2c79db5107 Add an example illustrating the use sleep(1) for performing timed
measurements.
2008-09-19 13:17:22 +00:00
Joseph Koshy
165b10b07b Fix a regression: attach process PMCs to the process created when
a command line is specified.
2008-07-01 15:20:15 +00:00
Joseph Koshy
e572c7a748 Document messages printed in verbose mode.
Requested by:	Fabien Thomas <fabien.thomas at netasq dot com>
2008-06-29 10:30:06 +00:00
Joseph Koshy
3c7b2ed7f9 Fix 'make checkdpadd'. 2008-02-22 06:25:49 +00:00
Jung-uk Kim
bcba261a2c Fix non-SMP kernel regression introduced in the previous commit.
Reviewed by:	jkoshy
2008-01-10 16:31:14 +00:00
Joseph Koshy
b6010f9e61 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.
2007-12-07 08:26:21 +00:00
Joseph Koshy
3ab065b6e3 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.
2007-12-03 10:29:49 +00:00
Ruslan Ermilov
71ce49ae8d Fixed "make checkdpadd" (missing library dependencies).
Approved by:	re (kensmith)
2007-10-01 18:15:11 +00:00
Joseph Koshy
fbd8b34a06 MFP4: Enhancements to pmcstat(8):
- Allow the "-t" option to take a regular expression naming command
  line processes to attach process PMCs to.

- Update the manual page and add an example showing the use of the
  new functionality.

- Update the (c) year on the affected source files.
2007-04-27 12:09:31 +00:00
Joseph Koshy
ee4910b119 MFP4: Enhancements and bug-fixes to pmcstat(8):
- The '-c' option now takes a comma-separated list of CPU
   numbers, or a literal '*' denoting all CPUs in the system.
   Subsequent system PMCs are allocated on the CPUs so specified.

   Change the default behaviour to allocate system PMCs on all CPUs,
   not just CPU 0.

   Update the manual page and add an example of how to use the new
   functionality.

 - Attach PMCs to a (commandline) child process more reliably.  This
   fixes a long standing bug in counting events incurred by short-lived
   processes.
2007-04-22 15:00:39 +00:00
Joseph Koshy
00a22dc5f9 Correct a sanity check. 2007-04-21 12:04:03 +00:00
Ruslan Ermilov
bc84aa4ba3 Markup fixes. 2006-09-29 17:57:04 +00:00
Ruslan Ermilov
24bffe0613 Line up usage output. 2006-09-29 17:28:01 +00:00
Joseph Koshy
2a6d2e9c2d When printing a map, print the number of samples recorded by each gmon.out file.
MFC after:	1 week
2006-04-05 15:12:25 +00:00
Joseph Koshy
302cbb9054 - 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
2006-04-02 12:52:16 +00:00
Joseph Koshy
49874f6ea3 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)
2006-03-26 12:20:54 +00:00
Joseph Koshy
f3c8200ef5 When generating profiles (-g) warn about shared objects that were
not found.
2005-12-25 05:11:29 +00:00
Joseph Koshy
bea6aa93d0 - Don't print an errno string when reporting dropped samples.
- Prevent an unsuccessful exec() of a target program from triggering
  a false 'dropped samples' message.
2005-12-24 17:00:33 +00:00
Joseph Koshy
7fbf3da209 Warn the user if the kernel driver dropped samples or ran out of event buffers
during a data collection run.
2005-10-21 18:59:59 +00:00
Joseph Koshy
887a8d04dc Handle 32 bit executables better on AMD64 platforms. 2005-10-18 05:13:27 +00:00
Joseph Koshy
9f8adcef84 Document pmcstat's inability to handle 32 bit executables on the
AMD64 while I work on a fix.

Noticed by:	ps
2005-10-18 04:40:11 +00:00
Joseph Koshy
60f918ef43 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
2005-09-14 21:15:50 +00:00
Joseph Koshy
a566429af3 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
2005-09-13 02:23:25 +00:00
Joseph Koshy
4525db8c52 Improve an error message.
MFC after:	3 days
2005-09-05 18:31:09 +00:00
Joseph Koshy
38fc5f3489 Correctly print system-wide PMC counts for short-lived command lines.
Reported by:	cracauer
MFC after:	3 days
2005-08-04 03:12:55 +00:00
Joseph Koshy
9133b63902 Sync usage message with the code and manual page.
Submitted by:	maxim
2005-07-23 13:49:04 +00:00
Robert Watson
000289660b Fix spelling error in sample command.
MFC after:	3 days
2005-07-13 13:18:17 +00:00
Joseph Koshy
dc1d9d2e7b Fix a bug that affected on-the-fly gmon.out file generation.
Approved by:	re (scottl)
2005-07-09 17:08:46 +00:00
Joseph Koshy
1fdbf2560e Add examples illustrating how to record system-wide profiles and
how to convert these to gprof(1) flat profiles.  Augment description
for the '-g' option.

Remove superfluous quotes around a macro argument, bump document date [1].

Reminded by:	ru [1]
Approved by:	re (blanket hwpmc)
2005-07-01 03:50:30 +00:00
Joseph Koshy
bf840f4a19 Unbreak tinderbox builds. Remove a debug printf.
Approved by:	re (blanket hwpmc)
2005-07-01 03:45:01 +00:00
Joseph Koshy
151392465f 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)
2005-06-30 19:01:26 +00:00
Joseph Koshy
21ce09ca81 - Tidy markup. [1]
- Remove mention of an unimplemented option.
- Clarify the behavior of pmcstat when logging PMCs are
  requested, but no log output file is specified.
- Add a cross-reference to pmclog(3).
- Bump document date.

Reviewed by:	ru
Submitted by:	ru [1]
Approved by:	re (blanket hwpmc)
2005-06-24 17:24:55 +00:00
Joseph Koshy
f263522a45 MFP4:
- Implement sampling modes and logging support in hwpmc(4).

- Separate MI and MD parts of hwpmc(4) and allow sharing of
  PMC implementations across different architectures.
  Add support for P4 (EMT64) style PMCs to the amd64 code.

- New pmcstat(8) options: -E (exit time counts) -W (counts
  every context switch), -R (print log file).

- pmc(3) API changes, improve our ability to keep ABI compatibility
  in the future.  Add more 'alias' names for commonly used events.

- bug fixes & documentation.
2005-06-09 19:45:09 +00:00
Joseph Koshy
39f4e0fcd2 Neaten usage message. 2005-05-02 10:07:11 +00:00
Joseph Koshy
c5153e190b Add convenience APIs pmc_width() and pmc_capabilities() to -lpmc.
Have pmcstat(8) and pmccontrol(8) use these APIs.

Return PMC class-related constants (PMC widths and capabilities)
with the OP GETCPUINFO call leaving OP PMCINFO to return only the
dynamic information associated with a PMC (i.e., whether enabled,
owner pid, reload count etc.).

Allow pmc_read() (i.e., OPS PMCRW) on active self-attached PMCs to
get upto-date values from hardware since we can guarantee that the
hardware is running the correct PMC at the time of the call.

Bug fixes:
 - (x86 class processors) Fix a bug that prevented an RDPMC
   instruction from being recognized as permitted till after the
   attached process had context switched out and back in again after
   a pmc_start() call.

   Tighten the rules for using RDPMC class instructions: a GETMSR
   OP is now allowed only after an OP ATTACH has been done by the
   PMC's owner to itself.  OP GETMSR is not allowed for PMCs that
   track descendants, for PMCs attached to processes other than
   their owner processes.

 - (P4/HTT processors only) Fix a bug that caused the MI and MD
   layers to get out of sync.  Add a new MD operation 'get_config()'
   as part of this fix.

 - Allow multiple system-mode PMCs at the same row-index but on
   different CPUs to be allocated.

 - Reject allocation of an administratively disabled PMC.

Misc. code cleanups and refactoring.  Improve a few comments.
2005-05-01 14:11:49 +00:00
Joseph Koshy
38bebdddd1 Remove superfluous CFLAGS additions. Make 'make checkdpadd' work.
Use '?=' for the WARNS line.

Submitted by:	ru
2005-04-19 14:40:50 +00:00
Joseph Koshy
ebccf1e3a6 Bring a working snapshot of hwpmc(4), its associated libraries, userland utilities
and documentation into -CURRENT.

Bump FreeBSD_version.

Reviewed by:	alc, jhb (kernel changes)
2005-04-19 04:01:25 +00:00