perf db-export: No need to have ->thread twice in struct export_sample
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 2 Apr 2015 14:16:05 +0000 (11:16 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 2 Apr 2015 16:18:43 +0000 (13:18 -0300)
As it comes from address_location->thread, that is already stored as
export_sample->al, where the thread can be obtained.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20150402141542.GA9630@kernel.org
Link: http://lkml.kernel.org/n/tip-bzotbl4epoztw0jd6sm2stpf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/db-export.c
tools/perf/util/db-export.h
tools/perf/util/scripting-engines/trace-event-python.c

index 5499887edc469250731cbb3bae53d7d02f76390c..bb39a3ffc70b3951f88f9260f01836cc4e959fc9 100644 (file)
@@ -289,7 +289,6 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
                .event = event,
                .sample = sample,
                .evsel = evsel,
-               .thread = thread,
                .al = al,
        };
        struct thread *main_thread;
index b9faa1386cf4a83de077716b322720cfbaa44f1e..25e22fd76aca1537813b9278db205993ca45075b 100644 (file)
@@ -34,7 +34,6 @@ struct export_sample {
        union perf_event        *event;
        struct perf_sample      *sample;
        struct perf_evsel       *evsel;
-       struct thread           *thread;
        struct addr_location    *al;
        u64                     db_id;
        u64                     comm_db_id;
index 1d3cc1b0173160843a616c909ad7ba20fcc0f711..5544b8cdd1ee4b777338b4767df30b080041a33c 100644 (file)
@@ -679,7 +679,7 @@ static int python_export_sample(struct db_export *dbe,
        tuple_set_u64(t, 0, es->db_id);
        tuple_set_u64(t, 1, es->evsel->db_id);
        tuple_set_u64(t, 2, es->al->machine->db_id);
-       tuple_set_u64(t, 3, es->thread->db_id);
+       tuple_set_u64(t, 3, es->al->thread->db_id);
        tuple_set_u64(t, 4, es->comm_db_id);
        tuple_set_u64(t, 5, es->dso_db_id);
        tuple_set_u64(t, 6, es->sym_db_id);