From 4fa1d76d62ea24122533dbb28782de74f5408ff9 Mon Sep 17 00:00:00 2001 From: Vitaly Mayatskikh Date: Thu, 18 Jun 2009 10:29:55 +0200 Subject: [PATCH] Syscall number as parameter While glibc doesn't support sys_perf_counter_open, user should specify parameter +syscall+ on target platform. --- perfcounters.lisp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/perfcounters.lisp b/perfcounters.lisp index ff59273..1ae9679 100644 --- a/perfcounters.lisp +++ b/perfcounters.lisp @@ -34,6 +34,12 @@ (in-package :perfcounters) +;; x86-64: 298 +;; x86: 336 +;; ppc: 319 +;; s390: 331 +(defparameter +syscall+ 298) + (defparameter +pr-task-perf-counters-disable+ 31) (defparameter +pr-task-perf-counters-enable+ 32) @@ -161,7 +167,7 @@ config event flags 3)) (multiple-value-bind (ret) - (%perf-counter-open 298 attr 0 -1 -1 0) + (%perf-counter-open +syscall+ attr 0 -1 -1 0) (foreign-free attr) (when (< ret 0) (fail "Syscall perf_counter_open")) -- 2.11.4.GIT