perf db-export: No need to pass thread twice to db_export__sample
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 2 Apr 2015 14:08:30 +0000 (11:08 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 2 Apr 2015 16:18:42 +0000 (13:18 -0300)
As it is available via another parameter, address_location->thread.

Acked-by: 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: lkml.kernel.org/r/551D08F8.3040706@intel.com
Link: http://lkml.kernel.org/n/tip-6dbn0tcm9hyv92g7h3zj2dbt@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 c81dae3997636ff9626b25debf9fdd0cbcbf7d61..5499887edc469250731cbb3bae53d7d02f76390c 100644 (file)
@@ -282,8 +282,9 @@ int db_export__branch_type(struct db_export *dbe, u32 branch_type,
 
 int db_export__sample(struct db_export *dbe, union perf_event *event,
                      struct perf_sample *sample, struct perf_evsel *evsel,
-                     struct thread *thread, struct addr_location *al)
+                     struct addr_location *al)
 {
+       struct thread* thread = al->thread;
        struct export_sample es = {
                .event = event,
                .sample = sample,
index adbd22d6679837d8a26d4e05ef0a0ea1d62db35b..b9faa1386cf4a83de077716b322720cfbaa44f1e 100644 (file)
@@ -97,7 +97,7 @@ int db_export__branch_type(struct db_export *dbe, u32 branch_type,
                           const char *name);
 int db_export__sample(struct db_export *dbe, union perf_event *event,
                      struct perf_sample *sample, struct perf_evsel *evsel,
-                     struct thread *thread, struct addr_location *al);
+                     struct addr_location *al);
 
 int db_export__branch_types(struct db_export *dbe);
 
index de8df1d5e1bd45b75eb7e8ac34eb6aa4b098c62b..1d3cc1b0173160843a616c909ad7ba20fcc0f711 100644 (file)
@@ -852,8 +852,7 @@ static void python_process_event(union perf_event *event,
        /* Reserve for future process_hw/sw/raw APIs */
        default:
                if (tables->db_export_mode)
-                       db_export__sample(&tables->dbe, event, sample, evsel,
-                                         al->thread, al);
+                       db_export__sample(&tables->dbe, event, sample, evsel, al);
                else
                        python_process_general_event(sample, evsel, al);
        }