diff options
Diffstat (limited to 'tools/perf/util/python.c')
| -rw-r--r-- | tools/perf/util/python.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index a9f2d7e1204d..f5e38451fdc5 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c | |||
| @@ -498,11 +498,11 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel, | |||
| 498 | struct cpu_map *cpus = NULL; | 498 | struct cpu_map *cpus = NULL; |
| 499 | struct thread_map *threads = NULL; | 499 | struct thread_map *threads = NULL; |
| 500 | PyObject *pcpus = NULL, *pthreads = NULL; | 500 | PyObject *pcpus = NULL, *pthreads = NULL; |
| 501 | int group = 0, overwrite = 0; | 501 | int group = 0, inherit = 0; |
| 502 | static char *kwlist[] = {"cpus", "threads", "group", "overwrite", NULL, NULL}; | 502 | static char *kwlist[] = {"cpus", "threads", "group", "inherit", NULL, NULL}; |
| 503 | 503 | ||
| 504 | if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOii", kwlist, | 504 | if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOii", kwlist, |
| 505 | &pcpus, &pthreads, &group, &overwrite)) | 505 | &pcpus, &pthreads, &group, &inherit)) |
| 506 | return NULL; | 506 | return NULL; |
| 507 | 507 | ||
| 508 | if (pthreads != NULL) | 508 | if (pthreads != NULL) |
| @@ -511,7 +511,8 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel, | |||
| 511 | if (pcpus != NULL) | 511 | if (pcpus != NULL) |
| 512 | cpus = ((struct pyrf_cpu_map *)pcpus)->cpus; | 512 | cpus = ((struct pyrf_cpu_map *)pcpus)->cpus; |
| 513 | 513 | ||
| 514 | if (perf_evsel__open(evsel, cpus, threads, group, overwrite) < 0) { | 514 | evsel->attr.inherit = inherit; |
| 515 | if (perf_evsel__open(evsel, cpus, threads, group) < 0) { | ||
| 515 | PyErr_SetFromErrno(PyExc_OSError); | 516 | PyErr_SetFromErrno(PyExc_OSError); |
| 516 | return NULL; | 517 | return NULL; |
| 517 | } | 518 | } |
