Go language interface to the PAPI performance API

go-papi

Description

go-papi provides a Go interface to PAPI, the Performance Application Programming Interface. PAPI provides convenient access to hardware performance counters, primarily those provided by the CPU but with others (e.g., various networks) also available.

As the PAPI(3) man page explains, the PAPI API is split into "high level" and "low level" functions, with the former being simpler to use but less flexible and the latter providing finer-grained control over the sets of data measured and reported.

Installation

Installation is a bit of a pain, as the new go tool doesn't yet handle custom Makefiles such as the one go-papi requires. (This requirement is due to some of go-papi's source files being generated automatically by a Perl script.)

First, download go-papi into your Go build tree without automatically building/installing it:

go get -d -v github.com/lanl/go-papi

Set the PAPI_INCDIR environment variable to the directory containing papi.h. Also, ensure that the directory containing libpapi.so is listed in your LD_LIBRARY_PATH.

Next, switch to the go-papi directory and build/test/install the package:

cd $GOROOT/src/pkg/github.com/lanl/go-papi
make
make check
make install

It is then safe to do a make clean to remove all of the byproducts of the installation process.

Documentation

Pre-built documentation for the core part of the go-papi API is available online at http://godoc.org/github.com/lanl/go-papi. Unfortunately, the online documentation omits descriptions of all constants, variables, etc. that are generated during the build process, specifically the list of PAPI events (papi-event.go), event modifiers (papi-emod.go), and error values (papi-errno.go).

Once you install go-papi, you can view the complete go-papi API with godoc, for example by running

godoc -http=:6060 -index

to start a local Web server then viewing the documentation at http://localhost:6060/pkg/github.com/lanl/go-papi/ in your favorite browser.

For code examples, take a look at the *_test.go files in the go-papi source distribution. papi_hl_test.go utilizes PAPI's high-level API; papi_ll_test.go utilizes PAPI's low-level API; and papi_test.go utilizes a few miscellaneous functions.

License

BSD-ish with a "modifications must be indicated" clause. See http://github.com/lanl/go-papi/blob/master/LICENSE.md for the full text.

Triad National Security, LLC (Triad) owns the copyright to go-papi, a component of the LANL Go Suite (identified internally as LA-CC-11-056).

Author

Scott Pakin, [email protected]

Owner
Los Alamos National Laboratory
Los Alamos National Laboratory
Similar Resources

Exercise for solve problem data processing, performance and something wrong in passing data

Citcall Exercise Exercise for solve problem data processing, performance and something wrong in passing data Pengolahan data data processing - Readme

Nov 25, 2021

Nune - High-performance numerical engine based on generic tensors

Nune (v0.1) Numerical engine is a library for performing numerical computation i

Nov 9, 2022

Nune-go - High-performance numerical engine based on generic tensors

Nune (v0.1) Numerical engine is a library for performing numerical computation i

Nov 9, 2022

Basic-api-with-go - A basic api with golang

I am creating my first API with GO. Install go get -u github.com/Yefhem/basic-ap

Jan 3, 2022

Go API wrapper for Greenhouse.io API

Greenhouse IO A Go interface to Greenhouse.io's API Useage Creating the Client NewClient accepts: A context; used for any HTTP requests made using the

Jan 14, 2022

Some utilities for Persian language in Go (Golang)

persian Some utilities for Persian language in Go (Golang). Installation go get github.com/mavihq/persian API .ToPersianDigits Converts all English d

Oct 22, 2022

Unit tests generator for Go programming language

Unit tests generator for Go programming language

GoUnit GoUnit is a commandline tool that generates tests stubs based on source function or method signature. There are plugins for Vim Emacs Atom Subl

Jan 1, 2023

FreeSWITCH Event Socket library for the Go programming language.

eventsocket FreeSWITCH Event Socket library for the Go programming language. It supports both inbound and outbound event socket connections, acting ei

Dec 11, 2022

go language generics system

Gotgo This document describes the third iteration of my attempt at a reasonable implementation of generics for go based on the idea of template packag

Dec 31, 2022
The gofinder program is an acme user interface to search through Go projects.

The gofinder program is an acme user interface to search through Go projects.

Jun 14, 2021
wkhtmltopdf Go bindings and high level interface for HTML to PDF conversion
wkhtmltopdf Go bindings and high level interface for HTML to PDF conversion

wkhtmltopdf Go bindings and high level interface for HTML to PDF conversion. Implements wkhtmltopdf Go bindings. It can be used to convert HTML docume

Dec 17, 2022
A go interface to NotifyMyAndroid

Notify My Android on the Go This is a go client for Notify my Android. With this, you can send simple notifications directly to your phone and other a

Aug 13, 2019
Generate type-safe Go converters by simply defining an interface

goverter a "type-safe Go converter" generator goverter is a tool for creating type-safe converters. All you have to do is create an interface and exec

Jan 4, 2023
Third party extension interface for sillyGirl.
Third party extension interface for sillyGirl.

Third party extension interface for sillyGirl.

Jan 11, 2022
Simple example program using CRUD operations to interface with azcosmos

Simple example program using CRUD operations to interface with azcosmos

Nov 15, 2021
Data interface for salesforce price bulk get

data-interface-for-salesforce-price-bulk-get 概要 data-interface-for-salesforce-price-bulk-get は、salesforce の価格オブジェクト取得に必要なデータの整形、および作成時に salesforce から返

Nov 27, 2021
Search running process for a given dll/function. Exposes a bufio.Scanner-like interface for walking a process' PEB

Search running process for a given dll/function. Exposes a bufio.Scanner-like interface for walking a process' PEB

Apr 21, 2022
elPrep: a high-performance tool for analyzing sequence alignment/map files in sequencing pipelines.
elPrep: a high-performance tool for analyzing sequence alignment/map files in sequencing pipelines.

Overview elPrep is a high-performance tool for analyzing .sam/.bam files (up to and including variant calling) in sequencing pipelines. The key advant

Nov 2, 2022
🦔 semver and constraint parsing with a focus on performance

semver ?? semver and constraint parsing with a focus on performance semver provides semantic version and constraint parsing, comparison, and testing.

Dec 1, 2021