<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/hwpmc/hwpmc_mod.c, branch release/6.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2005-11-03T00:35:26+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2005-11-03T00:35:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3640cb54210edbb7edbf1b12ef0127ecfcea967d'/>
<id>3640cb54210edbb7edbf1b12ef0127ecfcea967d</id>
<content type='text'>
'RELENG_6_0_0_RELEASE'.

This commit was manufactured to restore the state of the 6.0-RELEASE image.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_6_0_0_RELEASE'.

This commit was manufactured to restore the state of the 6.0-RELEASE image.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC:</title>
<updated>2005-08-26T19:49:32+00:00</updated>
<author>
<name>Joseph Koshy</name>
<email>jkoshy@FreeBSD.org</email>
</author>
<published>2005-08-26T19:49:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b2bdd605bb3ae21ff0c98fc765cef3f6f9e383d9'/>
<id>b2bdd605bb3ae21ff0c98fc765cef3f6f9e383d9</id>
<content type='text'>
 [ hwpmc_mod.c:1.14,1.15 ]
 - Print PMC capabilities at module load time.

 - Return EOPNOTSUPP instead of EINVAL if a PMC allocation request
   specifies a PMC capability (e.g., sampling) that is not supported
   by hardware.  Return EINVAL early if the PMC class passed in is
   not recognized.

 [ hwpmc_x86.c:1.3 ]
 - On x86 processors, turn off 'INTERRUPT' capabilities on PMCs
   if the CPU does not have its local APIC enabled.

Approved by:	re (scottl)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 [ hwpmc_mod.c:1.14,1.15 ]
 - Print PMC capabilities at module load time.

 - Return EOPNOTSUPP instead of EINVAL if a PMC allocation request
   specifies a PMC capability (e.g., sampling) that is not supported
   by hardware.  Return EINVAL early if the PMC class passed in is
   not recognized.

 [ hwpmc_x86.c:1.3 ]
 - On x86 processors, turn off 'INTERRUPT' capabilities on PMCs
   if the CPU does not have its local APIC enabled.

Approved by:	re (scottl)
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC { sys/dev/hwpmc/hwpmc_mod.c:1.13, sys/kern/kern_pmc.c:1.5,</title>
<updated>2005-08-15T18:46:13+00:00</updated>
<author>
<name>Joseph Koshy</name>
<email>jkoshy@FreeBSD.org</email>
</author>
<published>2005-08-15T18:46:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=14cdfc225986087f23457b99f762959eb246c46d'/>
<id>14cdfc225986087f23457b99f762959eb246c46d</id>
<content type='text'>
    sys/sys/pmckern.h:1.5 }

Fail the module loading process if the currently executing kernel
was not compiled with 'options HWPMC_HOOKS' or if the compiled-in
version numbers of the kernel and module are not in sync.

Approved by:	re (kensmith)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    sys/sys/pmckern.h:1.5 }

Fail the module loading process if the currently executing kernel
was not compiled with 'options HWPMC_HOOKS' or if the compiled-in
version numbers of the kernel and module are not in sync.

Approved by:	re (kensmith)
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC: Convert the atomic pointer operations to operate on uintptr_t rather</title>
<updated>2005-08-05T19:44:00+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2005-08-05T19:44:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=95b1c1e157778c489ab6051ab991c831c38bd863'/>
<id>95b1c1e157778c489ab6051ab991c831c38bd863</id>
<content type='text'>
than void *.

Approved by:	re (kensmith)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
than void *.

Approved by:	re (kensmith)
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r1.12:</title>
<updated>2005-07-29T02:58:34+00:00</updated>
<author>
<name>Joseph Koshy</name>
<email>jkoshy@FreeBSD.org</email>
</author>
<published>2005-07-29T02:58:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1e51aefe2ade10d57459525e0f71de71ca5afaf6'/>
<id>1e51aefe2ade10d57459525e0f71de71ca5afaf6</id>
<content type='text'>
  Use LK_CANRECURSE since when a PMC-owning process performs an exec(),
  the new text vnode is already locked by itself.

Approved by:	re (kensmith)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Use LK_CANRECURSE since when a PMC-owning process performs an exec(),
  the new text vnode is already locked by itself.

Approved by:	re (kensmith)
</pre>
</div>
</content>
</entry>
<entry>
<title>sys/dev/hwpmc/hwpmc_{amd,piv,ppro}.c:</title>
<updated>2005-07-09T17:29:36+00:00</updated>
<author>
<name>Joseph Koshy</name>
<email>jkoshy@FreeBSD.org</email>
</author>
<published>2005-07-09T17:29:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fbf1556d46ca444305b4886c726f25b679055f83'/>
<id>fbf1556d46ca444305b4886c726f25b679055f83</id>
<content type='text'>
- Update driver interrupt statistics correctly.

sys/sys/pmc.h, sys/dev/hwpmc/hwpmc_mod.c:
- Fix a bug affecting debug printfs.
- Move the 'stalled' flag from being in a bit in the
  'pm_flags' field of a 'struct pmc' to a field of its own in the
  same structure.  This flag is updated from the NMI handler and
  keeping it separate makes it easier to avoid races with other
  parts of the code.

sys/dev/hwpmc/hwpmc_logging.c:
- Do arithmetic with 'uintptr_t' types rather that casting
  to and from 'char *'.

Approved by:	re (scottl)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Update driver interrupt statistics correctly.

sys/sys/pmc.h, sys/dev/hwpmc/hwpmc_mod.c:
- Fix a bug affecting debug printfs.
- Move the 'stalled' flag from being in a bit in the
  'pm_flags' field of a 'struct pmc' to a field of its own in the
  same structure.  This flag is updated from the NMI handler and
  keeping it separate makes it easier to avoid races with other
  parts of the code.

sys/dev/hwpmc/hwpmc_logging.c:
- Do arithmetic with 'uintptr_t' types rather that casting
  to and from 'char *'.

Approved by:	re (scottl)
</pre>
</div>
</content>
</entry>
<entry>
<title>MFP4:</title>
<updated>2005-06-30T19:01:26+00:00</updated>
<author>
<name>Joseph Koshy</name>
<email>jkoshy@FreeBSD.org</email>
</author>
<published>2005-06-30T19:01:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=151392465ff4392040311cf7120651bbeab8bd0c'/>
<id>151392465ff4392040311cf7120651bbeab8bd0c</id>
<content type='text'>
- 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)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 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)
</pre>
</div>
</content>
</entry>
<entry>
<title>MFP4:</title>
<updated>2005-06-09T19:45:09+00:00</updated>
<author>
<name>Joseph Koshy</name>
<email>jkoshy@FreeBSD.org</email>
</author>
<published>2005-06-09T19:45:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f263522a45b9cf5cfb83a40e3135aa7108764d60'/>
<id>f263522a45b9cf5cfb83a40e3135aa7108764d60</id>
<content type='text'>
- 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 &amp; documentation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 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 &amp; documentation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add convenience APIs pmc_width() and pmc_capabilities() to -lpmc.</title>
<updated>2005-05-01T14:11:49+00:00</updated>
<author>
<name>Joseph Koshy</name>
<email>jkoshy@FreeBSD.org</email>
</author>
<published>2005-05-01T14:11:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c5153e190bd2410c60a50e108a7a60cde9a3c4bc'/>
<id>c5153e190bd2410c60a50e108a7a60cde9a3c4bc</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Return the correct register number in the 'get_msr()' MD function.</title>
<updated>2005-04-28T08:13:19+00:00</updated>
<author>
<name>Joseph Koshy</name>
<email>jkoshy@FreeBSD.org</email>
</author>
<published>2005-04-28T08:13:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6b8c8cd85fae1f4947956b06ec59b4f808951f29'/>
<id>6b8c8cd85fae1f4947956b06ec59b4f808951f29</id>
<content type='text'>
Only allow a process to use the x86 RDPMC instruction if it has
allocated and attached a PMC to itself.

Inform the MD layer of the "pseudo context switch out" that needs
to be done when the last thread of a process is exiting.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only allow a process to use the x86 RDPMC instruction if it has
allocated and attached a PMC to itself.

Inform the MD layer of the "pseudo context switch out" that needs
to be done when the last thread of a process is exiting.
</pre>
</div>
</content>
</entry>
</feed>
