Binary package “golang-github-hodgesds-perf-utils-dev” in ubuntu oracular
Perf Utilities for Go (library)
This package is a Go library for interacting with the perf subsystem in Linux.
This library allows you to do things like see how many CPU instructions a
function takes (roughly), profile a process for various hardware events, and
other interesting things. Note that because the Go scheduler can schedule a
goroutine across many OS threads it becomes rather difficult to get an exact
profile of an individual goroutine. However, a few tricks can be used; first a
call to runtime.
lock the current goroutine to an OS thread. Second a call to
unix.SchedSeta
(https:/
mask set. Note that if the pid argument is set 0 the calling thread is used
(the thread that was just locked). Before using this library you should
probably read the perf_event_open man page which this library uses heavily.
See the kernel guide https:/
tutorial how to use perf and some of the limitations.
.
If you are looking to interact with the perf subsystem directly with
perf_event_open syscall than this library is most likely for you. A large
number of the utility methods in this package should only be used for testing
and/or debugging performance issues. This is due to the nature of the Go
runtime being extremely tricky to profile on the goroutine level, with the
exception of a long running worker goroutine locked to an OS thread.
Eventually this library could be used to implement many of the features of
perf but in pure Go. Currently this library is used in node_exporter
(https:/
(https:/
for perf related metrics.
Published versions
- golang-github-hodgesds-perf-utils-dev 0.5.1-2 in amd64 (Release)
- golang-github-hodgesds-perf-utils-dev 0.5.1-2 in arm64 (Release)
- golang-github-hodgesds-perf-utils-dev 0.5.1-2 in armhf (Release)
- golang-github-hodgesds-perf-utils-dev 0.5.1-2 in i386 (Release)
- golang-github-hodgesds-perf-utils-dev 0.5.1-2 in ppc64el (Release)
- golang-github-hodgesds-perf-utils-dev 0.5.1-2 in riscv64 (Release)
- golang-github-hodgesds-perf-utils-dev 0.5.1-2 in s390x (Release)