diff options
author | Namhyung Kim <namhyung@gmail.com> | 2012-09-16 23:17:30 +0900 |
---|---|---|
committer | Chris E Ferron <chris.e.ferron@linux.intel.com> | 2012-09-17 08:15:27 -0700 |
commit | bb194d09d18e7a7000b2ca743b943c74fb982e31 (patch) | |
tree | 63806c9a774f153a4b02b6b424e17205d0dd0557 | |
parent | eb58a133c3693fc1ef58b16ccb781fa00a761ffb (diff) | |
download | powertop-2.0-v2-bb194d09d18e7a7000b2ca743b943c74fb982e31.tar.gz |
perf: Pass 0 as a third argument to ioctl on perf_fd
The third argument of PERF_EVENT_IOC_{ENABLE,DISABLE} ioctl is a flag
to determine whether the command should be applied to group members.
Since the powertop doesn't use the event grouping feature, it'd better
passing 0 as a third argument explicitly.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
-rw-r--r-- | src/perf/perf.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/perf/perf.cpp b/src/perf/perf.cpp index 69f1da3..c8ba7a8 100644 --- a/src/perf/perf.cpp +++ b/src/perf/perf.cpp @@ -128,7 +128,7 @@ void perf_event::create_perf_event(char *eventname, int _cpu) return; } - ret = ioctl(perf_fd, PERF_EVENT_IOC_ENABLE); + ret = ioctl(perf_fd, PERF_EVENT_IOC_ENABLE, 0); if (ret < 0) { fprintf(stderr, "failed to enable perf \n"); @@ -210,7 +210,7 @@ void perf_event::start(void) void perf_event::stop(void) { int ret; - ret = ioctl(perf_fd, PERF_EVENT_IOC_DISABLE); + ret = ioctl(perf_fd, PERF_EVENT_IOC_DISABLE, 0); if (ret) cout << "stop failing\n"; } |