svn commit: r333690 - in head/sys: dev/hwpmc kern sys

Jonathan T. Looney jtl at freebsd.org
Thu May 17 02:19:47 UTC 2018


On Wed, May 16, 2018 at 6:29 PM, Matt Macy <mmacy at freebsd.org> wrote:
>
> Author: mmacy
> Date: Wed May 16 22:29:20 2018
> New Revision: 333690
> URL: https://svnweb.freebsd.org/changeset/base/333690
>
> Log:
>   hwpmc: Implement per-thread counters for PMC sampling
>
>   This implements per-thread counters for PMC sampling. The thread
>   descriptors are stored in a list attached to the process descriptor.
>   These thread descriptors can store any per-thread information necessary
>   for current or future features. For the moment, they just store the
counters
>   for sampling.
>
>   The thread descriptors are created when the process descriptor is
created.
>   Additionally, thread descriptors are created or freed when threads
>   are started or stopped. Because the thread exit function is called in a
>   critical section, we can't directly free the thread descriptors. Hence,
>   they are freed to a cache, which is also used as a source of allocations
>   when needed for new threads.
>
>   Approved by:  sbruno
>   Obtained from:        jtl
>   Sponsored by: Juniper Networks, Limelight Networks
>   Differential Revision:        https://reviews.freebsd.org/D15335


Thanks!

Jonathan


More information about the svn-src-all mailing list