Patch: use a new __NR_perf_event_open macro introduced in linux 2.6.32
- From: Arseniy Alekseyev <rotsor gmail com>
- To: sysprof-list gnome org
- Subject: Patch: use a new __NR_perf_event_open macro introduced in linux 2.6.32
- Date: Wed, 26 Dec 2012 23:45:33 +0000
Dear sysprof,
Please make use of a new __NR_perf_event_open macro (renamed
__NR_perf_counter_open) when compiled with newer linux kernels.
Please find the patch below.
Thank you.
Arseniy.
--- a/collector.c
+++ b/collector.c
@@ -151,7 +151,9 @@ sysprof_perf_counter_open (struct perf_event_attr *attr,
unsigned long flags)
{
#ifndef __NR_perf_counter_open
-#if defined(__i386__)
+#ifdef __NR_perf_event_open
+#define __NR_perf_counter_open __NR_perf_event_open
+#elif defined(__i386__)
#define __NR_perf_counter_open 336
#elif defined(__x86_64__)
#define __NR_perf_counter_open 298
[Date Prev][Date Next] [Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]