Page MenuHomeFreeBSD

PMC: Collect user call chains while in kernel space
AbandonedPublic

Authored by jtl on Jul 28 2016, 2:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 23, 12:38 AM
Unknown Object (File)
Sat, Mar 23, 12:01 AM
Unknown Object (File)
Feb 14 2024, 2:50 AM
Unknown Object (File)
Dec 22 2023, 11:06 PM
Unknown Object (File)
Dec 21 2023, 1:01 AM
Unknown Object (File)
Nov 13 2023, 11:37 AM
Unknown Object (File)
Oct 29 2023, 6:54 PM
Unknown Object (File)
Oct 25 2023, 5:53 AM

Details

Reviewers
jhb
gnn
sbruno
Group Reviewers
manpages
pmc
Summary

Currently, when PMC is sampling call chains, it will sample a user-space call chain when the counter fires while in user space and will sample kernel-space call chains when the counter fires while in kernel space. This is useful functionality and should not be discarded.

However, there are cases where a user really wants to know the user-space call chain every time the sample counter fires, even if the sample counter fires while in kernel mode. This change adds this capability, which is activated when the user specifies an optional parameter.

(To go a step further, we discussed at BSDCan the fact that a user might like to be able to see both the kernel and user call chains associated with each sampling interval. However, this patch does not go that far.)

Note: This patch is against stable/10 + D4227 (diff 1). Once D4227 is committed, I will regenerate the patch against CURRENT. Until that time, this is probably more of a draft than a serious proposal.

Test Plan

This has been tested within Juniper on a large-scale multi-threaded app. I also plan to run some simple pathological threaded apps (constantly starting/stopping threads, several threads with long-running tight loops) which I've used for basic PMC sanity-testing for previous changes.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

jtl retitled this revision from to PMC: Collect user call chains while in kernel space.
jtl updated this object.
jtl edited the test plan for this revision. (Show Details)
jtl added reviewers: jhb, pmc.
jtl set the repository for this revision to rS FreeBSD src repository - subversion.
jtl added a subscriber: stevek.
gnn added a reviewer: gnn.
gnn added inline comments.
sys/dev/hwpmc/hwpmc_mod.c
198

Silly request but can you remove "normal" here because it makes me think of normalization of samples of data. I think that just pmc_add_sample() would be fine.

This revision is now accepted and ready to land.Jul 29 2016, 10:26 PM
sbruno requested changes to this revision.Jul 15 2017, 4:26 PM
sbruno added a subscriber: sbruno.

This review definitely needs D4227 updated and committed before it can land.

This revision now requires changes to proceed.Jul 15 2017, 4:27 PM

@jtl Can you close this as it appears @mmacy committed functionally the same thing? Or is there work yet to be done here?

This was largely committed by mmacy last year.