anchor.diff:                          :available t
                           :native nil
                           :papi nil)))
  -
  -;;; For some reason, PAPI really only likes to be loaded once.
  -(when (zerop (hash-table-count *events*))
  -  (load-foreign-library '(:or "libpapi.so.3" "libpapi.so"))
  -  (push-all-events-to-hash-table *events*))
   
   (defun list-event-names ()
     (loop for event being the hash-keys of *events* collect event))
  
positive.code: ;;;; -*- coding: utf-8; indent-tabs-mode: nil -*-
  
  (defpackage #:perfpiece
      (:use #:cl #:cffi)
    (:import-from #:alexandria
                  #:make-keyword #:switch #:when-let #:with-unique-names
                  #:symbolicate #:mean #:standard-deviation #:once-only))
  (in-package #:perfpiece)
  
  ;;;; Errors
  
negative.code:         nil
          string)))
  
  (defconstant +papi-native-mask+ #x40000000)
  (defconstant +papi-preset-mask+ #x80000000)
  
  (defun native-code-p (code)
    (<= +papi-native-mask+ code (1- +papi-preset-mask+)))
  
  (defun papi-code-to-event (code info)
    (when (zerop (papi-get-event-info code info))
  