aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2011-03-31 12:27:43 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-06-02 12:21:26 -0400
commit64348153c63b8c1f99f19f14a9c3cbd5df70c9d3 (patch)
treec1bee41565096fb2adce58125a9c936a26fa6fe4 /tools/perf/util
parente95cc02880947e9f77540b03e166470e8ac14cbc (diff)
perf python: Cleanup useless double NULL termination in method arg names
The list of methods argument names only needs to be NULL terminated once. Remove the second ones. Cc: David Ahern <daahern@cisco.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> Link: http://lkml.kernel.org/r/1301588863-20210-2-git-send-email-fweisbec@gmail.com Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/python.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index a9ac0504aabd..8e0b5a39d8a7 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -247,7 +247,7 @@ struct pyrf_cpu_map {
247static int pyrf_cpu_map__init(struct pyrf_cpu_map *pcpus, 247static int pyrf_cpu_map__init(struct pyrf_cpu_map *pcpus,
248 PyObject *args, PyObject *kwargs) 248 PyObject *args, PyObject *kwargs)
249{ 249{
250 static char *kwlist[] = { "cpustr", NULL, NULL, }; 250 static char *kwlist[] = { "cpustr", NULL };
251 char *cpustr = NULL; 251 char *cpustr = NULL;
252 252
253 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|s", 253 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|s",
@@ -316,7 +316,7 @@ struct pyrf_thread_map {
316static int pyrf_thread_map__init(struct pyrf_thread_map *pthreads, 316static int pyrf_thread_map__init(struct pyrf_thread_map *pthreads,
317 PyObject *args, PyObject *kwargs) 317 PyObject *args, PyObject *kwargs)
318{ 318{
319 static char *kwlist[] = { "pid", "tid", NULL, NULL, }; 319 static char *kwlist[] = { "pid", "tid", NULL };
320 int pid = -1, tid = -1; 320 int pid = -1, tid = -1;
321 321
322 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ii", 322 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ii",
@@ -418,7 +418,9 @@ static int pyrf_evsel__init(struct pyrf_evsel *pevsel,
418 "wakeup_events", 418 "wakeup_events",
419 "bp_type", 419 "bp_type",
420 "bp_addr", 420 "bp_addr",
421 "bp_len", NULL, NULL, }; 421 "bp_len",
422 NULL
423 };
422 u64 sample_period = 0; 424 u64 sample_period = 0;
423 u32 disabled = 0, 425 u32 disabled = 0,
424 inherit = 0, 426 inherit = 0,
@@ -499,7 +501,7 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel,
499 struct thread_map *threads = NULL; 501 struct thread_map *threads = NULL;
500 PyObject *pcpus = NULL, *pthreads = NULL; 502 PyObject *pcpus = NULL, *pthreads = NULL;
501 int group = 0, inherit = 0; 503 int group = 0, inherit = 0;
502 static char *kwlist[] = {"cpus", "threads", "group", "inherit", NULL, NULL}; 504 static char *kwlist[] = { "cpus", "threads", "group", "inherit", NULL };
503 505
504 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOii", kwlist, 506 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOii", kwlist,
505 &pcpus, &pthreads, &group, &inherit)) 507 &pcpus, &pthreads, &group, &inherit))
@@ -582,8 +584,7 @@ static PyObject *pyrf_evlist__mmap(struct pyrf_evlist *pevlist,
582 PyObject *args, PyObject *kwargs) 584 PyObject *args, PyObject *kwargs)
583{ 585{
584 struct perf_evlist *evlist = &pevlist->evlist; 586 struct perf_evlist *evlist = &pevlist->evlist;
585 static char *kwlist[] = {"pages", "overwrite", 587 static char *kwlist[] = { "pages", "overwrite", NULL };
586 NULL, NULL};
587 int pages = 128, overwrite = false; 588 int pages = 128, overwrite = false;
588 589
589 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ii", kwlist, 590 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ii", kwlist,
@@ -603,7 +604,7 @@ static PyObject *pyrf_evlist__poll(struct pyrf_evlist *pevlist,
603 PyObject *args, PyObject *kwargs) 604 PyObject *args, PyObject *kwargs)
604{ 605{
605 struct perf_evlist *evlist = &pevlist->evlist; 606 struct perf_evlist *evlist = &pevlist->evlist;
606 static char *kwlist[] = {"timeout", NULL, NULL}; 607 static char *kwlist[] = { "timeout", NULL };
607 int timeout = -1, n; 608 int timeout = -1, n;
608 609
609 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", kwlist, &timeout)) 610 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", kwlist, &timeout))
@@ -674,7 +675,7 @@ static PyObject *pyrf_evlist__read_on_cpu(struct pyrf_evlist *pevlist,
674 struct perf_evlist *evlist = &pevlist->evlist; 675 struct perf_evlist *evlist = &pevlist->evlist;
675 union perf_event *event; 676 union perf_event *event;
676 int sample_id_all = 1, cpu; 677 int sample_id_all = 1, cpu;
677 static char *kwlist[] = {"cpu", "sample_id_all", NULL, NULL}; 678 static char *kwlist[] = { "cpu", "sample_id_all", NULL };
678 int err; 679 int err;
679 680
680 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|i", kwlist, 681 if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|i", kwlist,