Page MenuHomeFreeBSD

HWPMC tracing support (5) -- Intel PT
Needs ReviewPublic

Authored by br on Apr 16 2018, 1:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 26, 12:55 AM
Unknown Object (File)
Tue, Jun 25, 10:04 PM
Unknown Object (File)
Sun, Jun 23, 12:40 PM
Unknown Object (File)
Sun, Jun 23, 12:26 PM
Unknown Object (File)
Sun, Jun 23, 12:25 PM
Unknown Object (File)
Sun, Jun 23, 12:22 PM
Unknown Object (File)
Sun, Jun 23, 12:21 PM
Unknown Object (File)
Sun, Jun 23, 12:21 PM
Subscribers
None

Details

Reviewers
kib
markj

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

br retitled this revision from HWPMC tracing support (4) -- Intel PT to HWPMC tracing support (5) -- Intel PT.

don't take additional reference to object. We already taking one in pmc_mmap_single()

merge changes from upstream

br removed a reviewer: emaste.
sys/dev/hwpmc/hwpmc_pt.c
162

I don't have the XFEATURE_ENABLED_PT definition. Where is it?

Include sys/x86/include/specialreg.h

sys/dev/hwpmc/hwpmc_pt.c
162

I missed the diff to specialreg.h. Added

sys/dev/hwpmc/hwpmc_pt.c
173

This assumes that lazy_fpu_switch is configured, which is no longer the default behaviour.

I suspect that we should really be saving/restoring PT state in the main kernel.

sys/dev/hwpmc/hwpmc_pt.c
173

You mean, on context switch ? I do not think it is needed.

You can save previous value of CR0.TS and only set it when needed at the end.
To be modular, code should restore previous XSS mask after doing it job.
The code must assert that we are in critical section (or with disabled interrupts).
Why is pt_xsave_mask a variable instead of literal symbol ?

br marked an inline comment as done.Oct 7 2019, 4:28 PM
br added inline comments.
sys/dev/hwpmc/hwpmc_pt.c
173
  • pt_xsave_mask changed a literal symbol
  • Assertion added
  • Original XSS mask restored