Skip to contentSkip to conversation

perf tools: Fix -C option for record command

PATCH In review Jiri Olsa 4 participants 15 messages Feb 25, 2013 – Mar 21, 2013 perf events

lore
Share & tools
lore

Jiri Olsa

author
#0 lore raw

cover perf tools: Fix -C option for record command

hi,
Oleg reported the -C option in record not work properly:
http://marc.info/?l=linux-kernel&m=136017986313315&w=2

The issue seems to be that the '-C X' target is considered as task related when it comes to synthetizing threads. Adding the fix plus some automated test cases.

Available in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/linux.git
perf/oleg1

jirka

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc David Ahern <[email protected]>
Cc Oleg Nesterov <[email protected]>

---
Jiri Olsa (5):
perf tools: Fix -C option for record command perf tests: Make attr script verbose friendly perf tests: Make attr script test event cpu perf tests: Add attr record -C cpu test perf tests: Add attr stat -C cpu test

 tools/perf/builtin-record.c          |  6 ++++--
 tools/perf/tests/attr.c              |  9 +++++++--
 tools/perf/tests/attr.py             |  5 +++--
 tools/perf/tests/attr/base-record    |  1 +
 tools/perf/tests/attr/base-stat      |  1 +
 tools/perf/tests/attr/test-record-C0 | 13 +++++++++++++
 tools/perf/tests/attr/test-stat-C0   |  9 +++++++++
 7 files changed, 38 insertions(+), 6 deletions(-)
 create mode 100644 tools/perf/tests/attr/test-record-C0
 create mode 100644 tools/perf/tests/attr/test-stat-C0
author
#1 lore raw

PATCH 1/5 perf tools: Fix -C option for record command

Currently the -C option does not work for record command, because of the targets mismatch when synthesizing threads.

Fixing this by using proper target interface for the synthesize decision.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc David Ahern <[email protected]>
Cc Oleg Nesterov <[email protected]>
---
 tools/perf/builtin-record.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
tools/perf/builtin-record.c +4 -2
index 774c907..f1a939e 100644
@@ -573,13 +573,15 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
 					 perf_event__synthesize_guest_os, tool);
 	}
 
-	if (!opts->target.system_wide)
+	if (perf_target__has_task(&opts->target))
 		err = perf_event__synthesize_thread_map(tool, evsel_list->threads,
 						  process_synthesized_event,
 						  machine);
-	else
+	else if (perf_target__has_cpu(&opts->target))
 		err = perf_event__synthesize_threads(tool, process_synthesized_event,
 					       machine);
+	else /* command specified */
+		err = 0;
 
 	if (err != 0)
 		goto out_delete_session;
Signature · 1 line
1.7.11.7
#2 lore raw

To clarify, I am not trying to review this patch, I'd like to ask the question...

Quoted 6 lines · Jiri Olsa

Currently the -C option does not work for record command, because of the targets mismatch when synthesizing threads.

Fixing this by using proper target interface for the synthesize decision.

OK, but my fix had the different goal. I thought that

	$ perf ... record -C0 sleep 1

should attach the counter to the child process (workload) and set event->cpu = 0 (instead of -1). With this patch we create the cpu counter and event->task == NULL (thanks for your private explanations btw ;).

But note that (iirc, I didn't even try to read this code again)

	$ perf ... record -a sleep 1

attaches the counter to the task, and I think that -a/C should be consistent.

However,

tools/perf/builtin-record.c static int __cmd_record(struct perf_record *rec, int argc, const char **argv) · line 581

Quoted 12 lines
tools/perf/builtin-record.c +2 -2
@@ -573,13 +573,15 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
 					 perf_event__synthesize_guest_os, tool);
 	}
 
-	if (!opts->target.system_wide)
+	if (perf_target__has_task(&opts->target))
 		err = perf_event__synthesize_thread_map(tool, evsel_list->threads,
 						  process_synthesized_event,
 						  machine);
-	else
+	else if (perf_target__has_cpu(&opts->target))
 		err = perf_event__synthesize_threads(tool, process_synthesized_event,

I do agree, this should be changed too, because "-a sleep 1" sets ->target.system_wide.

Oleg.

#3 lore raw
Quoted 11 lines · Oleg Nesterov

To clarify, I am not trying to review this patch, I'd like to ask the question...

Quoted 6 lines · Jiri Olsa

Currently the -C option does not work for record command, because of the targets mismatch when synthesizing threads.

Fixing this by using proper target interface for the synthesize decision.

Quoted 6 lines

OK, but my fix had the different goal. I thought that

	$ perf ... record -C0 sleep 1

should attach the counter to the child process (workload) and set event->cpu = 0 (instead of -1). With this patch we create the cpu

If a target is given (-a, -C, -p or -t) that is what the data is collected for -- all cpus, a cpu, or one or more task ids. The workload in that case becomes a means for bounding the data collection (start and end points).

If you want to collect events for a workload you just run perf-record -- workload.

Last time I dug into it (which was 8-12 months ago) -C required -a to work properly. -a (system_wide) meaning collect events for all cpus and then -C meaning but only for this cpu. Perhaps Namyhung's target changes may have simplified fixing that as Jiri's patch suggests.

David

author
#4 lore raw
Quoted 24 lines · David Ahern
Quoted 11 lines · Oleg Nesterov

To clarify, I am not trying to review this patch, I'd like to ask the question...

Quoted 6 lines · Jiri Olsa

Currently the -C option does not work for record command, because of the targets mismatch when synthesizing threads.

Fixing this by using proper target interface for the synthesize decision.

Quoted 6 lines

OK, but my fix had the different goal. I thought that

	$ perf ... record -C0 sleep 1

should attach the counter to the child process (workload) and set event->cpu = 0 (instead of -1). With this patch we create the cpu

If a target is given (-a, -C, -p or -t) that is what the data is collected for -- all cpus, a cpu, or one or more task ids. The workload in that case becomes a means for bounding the data collection (start and end points).

Quoted 8 lines

If you want to collect events for a workload you just run perf-record -- workload.

Last time I dug into it (which was 8-12 months ago) -C required -a to work properly. -a (system_wide) meaning collect events for all cpus and then -C meaning but only for this cpu. Perhaps Namyhung's target changes may have simplified fixing that as Jiri's patch suggests.

yes, that's what actually this patch fixies.. now you can run:

perf record -C 0 ls

and that will attach to cpu 0 only (same as '-a -C 0' before)

maybe we could consider having:

perf record -C 0 ls
- attaching to CPU 0 and ls workload pid

perf record -a -C 0 ls
- attaching to CPU 0 globaly

jirka

#5 lore raw
Quoted 7 lines · Jiri Olsa
Quoted 4 lines · David Ahern

If a target is given (-a, -C, -p or -t) that is what the data is collected for -- all cpus, a cpu, or one or more task ids. The workload in that case becomes a means for bounding the data collection (start and end points).

OK, so I misunderstood the intent and misread the code. Thanks David.

Quoted 5 lines

yes, that's what actually this patch fixies.. now you can run:

perf record -C 0 ls

and that will attach to cpu 0 only (same as '-a -C 0' before)

Yes, and thus this is consistent with -a and correct. Thanks and sorry for noise.

But,

Quoted 7 lines

maybe we could consider having:

perf record -C 0 ls
- attaching to CPU 0 and ls workload pid

perf record -a -C 0 ls
- attaching to CPU 0 globaly

Can't really comment since I am not a perf user, but imho looks good.

And useful. And least this behaviour was useful to me when I tried to test the perf/uprobe changes.

Oleg.

#6 lore raw

[tip:perf/urgent] perf record: Fix -C option

In reply to Jiri Olsa
perf record: Fix -C option
Commit-ID:  e4dd45fe7add0de09e0e5b2b511732d9c86b6ee7
Gitweb:     http://git.kernel.org/tip/e4dd45fe7add0de09e0e5b2b511732d9c86b6ee7
Author:     Jiri Olsa <[email protected]>
AuthorDate: Mon, 25 Feb 2013 10:52:48 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 13 Mar 2013 16:58:28 -0300

perf record: Fix -C option

Currently the -C option does not work for record command, because of the targets mismatch when synthesizing threads.

Fixing this by using proper target interface for the synthesize decision.

---
 tools/perf/builtin-record.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
tools/perf/builtin-record.c +4 -2
index 774c907..f1a939e 100644
@@ -573,13 +573,15 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
 					 perf_event__synthesize_guest_os, tool);
 	}
 
-	if (!opts->target.system_wide)
+	if (perf_target__has_task(&opts->target))
 		err = perf_event__synthesize_thread_map(tool, evsel_list->threads,
 						  process_synthesized_event,
 						  machine);
-	else
+	else if (perf_target__has_cpu(&opts->target))
 		err = perf_event__synthesize_threads(tool, process_synthesized_event,
 					       machine);
+	else /* command specified */
+		err = 0;
 
 	if (err != 0)
 		goto out_delete_session;
author
#7 lore raw

PATCH 2/5 perf tests: Make attr script verbose friendly

In reply to Jiri Olsa

Making the attr test script runner to pass proper verbose option. Also making single '-v' be more reader friendly and display just the test name.

Making the current output to be display for '-vv'.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc David Ahern <[email protected]>
Cc Oleg Nesterov <[email protected]>
---
 tools/perf/tests/attr.c  | 9 +++++++--
 tools/perf/tests/attr.py | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
tools/perf/tests/attr.c +7 -2
index bdcceb8..038de3e 100644
@@ -147,10 +147,15 @@ void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu,
 
 static int run_dir(const char *d, const char *perf)
 {
+	char v[] = "-vvvvv";
+	int vcnt = min(verbose, (int) sizeof(v) - 1);
 	char cmd[3*PATH_MAX];
 
-	snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %s",
-		 d, d, perf, verbose ? "-v" : "");
+	if (verbose)
+		vcnt++;
+
+	snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %.*s",
+		 d, d, perf, vcnt, v);
 
 	return system(cmd);
 }
tools/perf/tests/attr.py +2 -2
index 2f629ca..e0ea513 100644
@@ -121,7 +121,7 @@ class Test(object):
         parser = ConfigParser.SafeConfigParser()
         parser.read(path)
 
-        log.debug("running '%s'" % path)
+        log.warning("running '%s'" % path)
 
         self.path     = path
         self.test_dir = options.test_dir
@@ -172,7 +172,7 @@ class Test(object):
               self.perf, self.command, tempdir, self.args)
         ret = os.WEXITSTATUS(os.system(cmd))
 
-        log.warning("  running '%s' ret %d " % (cmd, ret))
+        log.info("  '%s' ret %d " % (cmd, ret))
 
         if ret != int(self.ret):
             raise Unsup(self)
Signature · 1 line
1.7.11.7
#8 lore raw

[tip:perf/core] perf tests: Make attr script verbose friendly

perf tests: Make attr script verbose friendly
Commit-ID:  097c87582c5719adbd8b700f4250e1f1d9f15ebf
Gitweb:     http://git.kernel.org/tip/097c87582c5719adbd8b700f4250e1f1d9f15ebf
Author:     Jiri Olsa <[email protected]>
AuthorDate: Mon, 25 Feb 2013 10:52:49 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 15 Mar 2013 13:05:59 -0300

perf tests: Make attr script verbose friendly

Making the attr test script runner to pass proper verbose option. Also making single '-v' be more reader friendly and display just the test name.

Making the current output to be display for '-vv'.

Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/tests/attr.c  | 9 +++++++--
 tools/perf/tests/attr.py | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)
tools/perf/tests/attr.c +7 -2
index bdcceb8..038de3e 100644
@@ -147,10 +147,15 @@ void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu,
 
 static int run_dir(const char *d, const char *perf)
 {
+	char v[] = "-vvvvv";
+	int vcnt = min(verbose, (int) sizeof(v) - 1);
 	char cmd[3*PATH_MAX];
 
-	snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %s",
-		 d, d, perf, verbose ? "-v" : "");
+	if (verbose)
+		vcnt++;
+
+	snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %.*s",
+		 d, d, perf, vcnt, v);
 
 	return system(cmd);
 }
tools/perf/tests/attr.py +2 -2
index 2f629ca..e0ea513 100644
@@ -121,7 +121,7 @@ class Test(object):
         parser = ConfigParser.SafeConfigParser()
         parser.read(path)
 
-        log.debug("running '%s'" % path)
+        log.warning("running '%s'" % path)
 
         self.path     = path
         self.test_dir = options.test_dir
@@ -172,7 +172,7 @@ class Test(object):
               self.perf, self.command, tempdir, self.args)
         ret = os.WEXITSTATUS(os.system(cmd))
 
-        log.warning("  running '%s' ret %d " % (cmd, ret))
+        log.info("  '%s' ret %d " % (cmd, ret))
 
         if ret != int(self.ret):
             raise Unsup(self)
author
#9 lore raw

PATCH 3/5 perf tests: Make attr script test event cpu

In reply to Jiri Olsa

Make attr script to check for 'cpu' when testing event properties. This will allow us to check the '-C X' option for both record and stat commands.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc David Ahern <[email protected]>
Cc Oleg Nesterov <[email protected]>
---
 tools/perf/tests/attr.py          | 1 +
 tools/perf/tests/attr/base-record | 1 +
 tools/perf/tests/attr/base-stat   | 1 +
 3 files changed, 3 insertions(+)
tools/perf/tests/attr.py +1 -0
index e0ea513..c9b4b62 100644
@@ -24,6 +24,7 @@ class Unsup(Exception):
 
 class Event(dict):
     terms = [
+        'cpu',
         'flags',
         'type',
         'size',
tools/perf/tests/attr/base-record +1 -0
index 5bc3880..b4fc835 100644
@@ -2,6 +2,7 @@
 fd=1
 group_fd=-1
 flags=0
+cpu=*
 type=0|1
 size=96
 config=0
tools/perf/tests/attr/base-stat +1 -0
index 4bd79a8..748ee94 100644
@@ -2,6 +2,7 @@
 fd=1
 group_fd=-1
 flags=0
+cpu=*
 type=0
 size=96
 config=0
Signature · 1 line
1.7.11.7
#10 lore raw

[tip:perf/core] perf tests: Make attr script test event cpu

perf tests: Make attr script test event cpu
Commit-ID:  c21d0030cfe17d87f8ad80a4205c8203bdb3949b
Gitweb:     http://git.kernel.org/tip/c21d0030cfe17d87f8ad80a4205c8203bdb3949b
Author:     Jiri Olsa <[email protected]>
AuthorDate: Mon, 25 Feb 2013 10:52:50 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 15 Mar 2013 13:06:00 -0300

perf tests: Make attr script test event cpu

Make attr script to check for 'cpu' when testing event properties. This will allow us to check the '-C X' option for both record and stat commands.

Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/tests/attr.py          | 1 +
 tools/perf/tests/attr/base-record | 1 +
 tools/perf/tests/attr/base-stat   | 1 +
 3 files changed, 3 insertions(+)
tools/perf/tests/attr.py +1 -0
index e0ea513..c9b4b62 100644
@@ -24,6 +24,7 @@ class Unsup(Exception):
 
 class Event(dict):
     terms = [
+        'cpu',
         'flags',
         'type',
         'size',
tools/perf/tests/attr/base-record +1 -0
index 5bc3880..b4fc835 100644
@@ -2,6 +2,7 @@
 fd=1
 group_fd=-1
 flags=0
+cpu=*
 type=0|1
 size=96
 config=0
tools/perf/tests/attr/base-stat +1 -0
index 4bd79a8..748ee94 100644
@@ -2,6 +2,7 @@
 fd=1
 group_fd=-1
 flags=0
+cpu=*
 type=0
 size=96
 config=0
author
#11 lore raw

PATCH 4/5 perf tests: Add attr record -C cpu test

In reply to Jiri Olsa

Adding test to validate perf_event_attr data for command:
'record -C 0'

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc David Ahern <[email protected]>
Cc Oleg Nesterov <[email protected]>
---
 tools/perf/tests/attr/test-record-C0 | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 tools/perf/tests/attr/test-record-C0
tools/perf/tests/attr/test-record-C0 new file +13 -0
new file mode 100644
index 0000000..d6a7e43
@@ -0,0 +1,13 @@
+[config]
+command = record
+args    = -C 0 kill >/dev/null 2>&1
+
+[event:base-record]
+cpu=0
+
+# no enable on exec for CPU attached
+enable_on_exec=0
+
+# PERF_SAMPLE_IP | PERF_SAMPLE_TID PERF_SAMPLE_TIME | # PERF_SAMPLE_PERIOD
+# + PERF_SAMPLE_CPU added by -C 0
+sample_type=391
Signature · 1 line
1.7.11.7
#12 lore raw

[tip:perf/core] perf tests: Add attr record -C cpu test

perf tests: Add attr record -C cpu test
Commit-ID:  b03ec1b53070e0fae9de72b584d94b65a4a97635
Gitweb:     http://git.kernel.org/tip/b03ec1b53070e0fae9de72b584d94b65a4a97635
Author:     Jiri Olsa <[email protected]>
AuthorDate: Mon, 25 Feb 2013 10:52:51 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 15 Mar 2013 13:06:00 -0300

perf tests: Add attr record -C cpu test

Adding test to validate perf_event_attr data for command:
'record -C 0'

Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/tests/attr/test-record-C0 | 13 +++++++++++++
 1 file changed, 13 insertions(+)
tools/perf/tests/attr/test-record-C0 new file +13 -0
new file mode 100644
index 0000000..d6a7e43
@@ -0,0 +1,13 @@
+[config]
+command = record
+args    = -C 0 kill >/dev/null 2>&1
+
+[event:base-record]
+cpu=0
+
+# no enable on exec for CPU attached
+enable_on_exec=0
+
+# PERF_SAMPLE_IP | PERF_SAMPLE_TID PERF_SAMPLE_TIME | # PERF_SAMPLE_PERIOD
+# + PERF_SAMPLE_CPU added by -C 0
+sample_type=391
author
#13 lore raw

PATCH 5/5 perf tests: Add attr stat -C cpu test

In reply to Jiri Olsa

Adding test to validate perf_event_attr data for command:
'stat -C 0'

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc David Ahern <[email protected]>
Cc Oleg Nesterov <[email protected]>
---
 tools/perf/tests/attr/test-stat-C0 | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 tools/perf/tests/attr/test-stat-C0
tools/perf/tests/attr/test-stat-C0 new file +9 -0
new file mode 100644
index 0000000..aa83595
@@ -0,0 +1,9 @@
+[config]
+command = stat
+args    = -e cycles -C 0 kill >/dev/null 2>&1
+ret     = 1
+
+[event:base-stat]
+# events are enabled by default when attached to cpu
+disabled=0
+enable_on_exec=0
Signature · 1 line
1.7.11.7
#14 lore raw

[tip:perf/core] perf tests: Add attr stat -C cpu test

perf tests: Add attr stat -C cpu test
Commit-ID:  9687b89d21999301ed386855c04b60d00ed1ec02
Gitweb:     http://git.kernel.org/tip/9687b89d21999301ed386855c04b60d00ed1ec02
Author:     Jiri Olsa <[email protected]>
AuthorDate: Mon, 25 Feb 2013 10:52:52 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 15 Mar 2013 13:06:00 -0300

perf tests: Add attr stat -C cpu test

Adding test to validate perf_event_attr data for command:
'stat -C 0'

Cc Corey Ashford <[email protected]>
Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/tests/attr/test-stat-C0 | 9 +++++++++
 1 file changed, 9 insertions(+)
tools/perf/tests/attr/test-stat-C0 new file +9 -0
new file mode 100644
index 0000000..aa83595
@@ -0,0 +1,9 @@
+[config]
+command = stat
+args    = -e cycles -C 0 kill >/dev/null 2>&1
+ret     = 1
+
+[event:base-stat]
+# events are enabled by default when attached to cpu
+disabled=0
+enable_on_exec=0