perf intlist: Add priv member
authorDavid Ahern <dsahern@gmail.com>
Sat, 28 Sep 2013 19:13:02 +0000 (13:13 -0600)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 11 Oct 2013 15:17:55 +0000 (12:17 -0300)
Allows commands to leverage intlist infrastructure for opaque
structures.

For example an upcoming perf-trace change will use this as a means of
tracking syscalls statistics by task.

Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1380395584-9025-6-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/intlist.c
tools/perf/util/intlist.h

index 11a8d86f7fea3bf4ec5fb8cb05f27dc4c491d948..826d7b38c9a08abb96e1ed381f0e4c2b8e60c2cf 100644 (file)
@@ -20,6 +20,7 @@ static struct rb_node *intlist__node_new(struct rblist *rblist __maybe_unused,
 
        if (node != NULL) {
                node->i = i;
+               node->priv = NULL;
                rc = &node->rb_node;
        }
 
index 62351dad848f76c478cced833c315cc71ff1ed63..0eb00ac39e011e53137dffdbaca39768644c0b3d 100644 (file)
@@ -9,6 +9,7 @@
 struct int_node {
        struct rb_node rb_node;
        int i;
+       void *priv;
 };
 
 struct intlist {