]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pmc: convert native to jsonl and track TSC value of samples
authorMatt Macy <mmacy@FreeBSD.org>
Thu, 7 Jun 2018 02:03:22 +0000 (02:03 +0000)
committerMatt Macy <mmacy@FreeBSD.org>
Thu, 7 Jun 2018 02:03:22 +0000 (02:03 +0000)
commitf992dd4b5c6635e079c572fe1b59e34f0e28ad6d
tree6cd98711d1e0c3f928cc01dc292b253f900c79da
parent1b000b505b84270219bff27d9c627877209f7e56
pmc: convert native to jsonl and track TSC value of samples

- add '-j' options to filter to enable converting native pmc
  log format to json lines format to enable the use of scripts
  and external tooling

% pmc filter -j pmc.log pmc.jsonl

- Record the tsc value in sampling interrupts as opposed to
  recording nanotime when the sample is copied to a global log
  in hardclock - potentially many milliseconds later.

- At initialize record the tsc_freq and the time of day to give
  us an offset for translating the tsc values in callchain records
15 files changed:
lib/Makefile
lib/libpmc/Makefile
lib/libpmc/libpmc_json.cc [new file with mode: 0644]
lib/libpmc/pmcformat.h [new file with mode: 0644]
lib/libpmc/pmclog.c
lib/libpmc/pmclog.h
sys/dev/hwpmc/hwpmc_logging.c
sys/dev/hwpmc/hwpmc_mod.c
sys/sys/pmc.h
sys/sys/pmclog.h
usr.sbin/Makefile
usr.sbin/pmc/Makefile
usr.sbin/pmc/cmd_pmc_filter.cc
usr.sbin/pmccontrol/Makefile
usr.sbin/pmcstat/Makefile