Page MenuHomeFreeBSD

pmc: new pmc log processing framework
Needs ReviewPublic

Authored by ali_mashtizadeh.com on Tue, Jun 23, 4:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 21, 1:58 AM
Unknown Object (File)
Mon, Jul 20, 10:20 AM
Unknown Object (File)
Mon, Jul 20, 7:56 AM
Unknown Object (File)
Mon, Jul 20, 2:09 AM
Unknown Object (File)
Fri, Jul 17, 6:46 AM
Unknown Object (File)
Thu, Jul 9, 5:36 AM
Unknown Object (File)
Wed, Jul 8, 11:27 AM
Unknown Object (File)
Wed, Jul 8, 11:25 AM
Subscribers

Details

Reviewers
imp
jhb
mhorne
adrian
Group Reviewers
pmc
Summary

View is a class for building PMC log processing tools it is designed to
work with the new PMC record command that adds a header with additional
CPU information. The new framework processes PMC logs about 2.5 times
faster and in about half the code as libpmcstat.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74631
Build 71514: arc lint + arc unit

Event Timeline

ali_mashtizadeh.com created this revision.
adrian added inline comments.
usr.sbin/pmc/view.cc
67

shouldn't you check to make sure it has at least two bytes in the string/buffer first?

198

ok, what about non x86? is this whole codepath x86 only?

438

does this handle the kernel/modules path versus debug path stuff?

Same with /usr/lib/debug for binaries vs debug info?

569

ah here, please double check this for kernel/modules as their paths differ slightly

716

Yeah, for ppc (and in the future if anyone else does it) we should either expose a way to do this (eg via a sysctl) or to override it with a command line option somehow so I have the tools i need to fix it.

usr.sbin/pmc/view.cc
67

Fixed, good catch.

198

Yes this is x86 specific, because I use the CPUID root/leaf structure to walk the variable length structure I used CPUID just for x86 and plan to use CPUINFO for other architectures. We don't generally need this info even though its nice, but in the case of IBS we need to provide architecture specific corrections to the IBS data.

569

I believe this is correct I got kernel and kernel modules resolving correctly. Is it something to do with /boot/modules or something else I that doesn't happen on my setup?

716

I'd rather you don't need to pass anything in! This should be a value that I store in the pmc headers so it just works every time even after a reboot or on another machine.

I'll get this tested and fixed as a separate patch I assume that applies to my POWER9 machines? I have an old Apple G5 but I haven't booted it in a long time.

An original goal I had was fix up the endianness/size issues so it's easy to work remotely regardless of architecture but I can't do that without breaking hwpmc compat otherwise we could try rewriting the log on read or something.

This revision is now accepted and ready to land.Wed, Jul 1, 9:10 PM
This revision now requires review to proceed.Thu, Jul 2, 4:13 PM