aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2019-05-20 07:37:21 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-06-05 08:47:57 -0400
commit52a2ab6fa99df9288f2c8c7f461b815550b9b366 (patch)
treee8712546967ed8ebbfb65c9d53d7b35057fc3f6d
parent1159facee97fe184a434db3086604c7572fd7dfa (diff)
perf db-export: Export IPC information
Export cycle and instruction counts on samples and call-returns. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/20190520113728.14389-16-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/scripting-engines/trace-event-python.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 22f52b669871..6acb379b53ec 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -1111,7 +1111,7 @@ static int python_export_sample(struct db_export *dbe,
1111 struct tables *tables = container_of(dbe, struct tables, dbe); 1111 struct tables *tables = container_of(dbe, struct tables, dbe);
1112 PyObject *t; 1112 PyObject *t;
1113 1113
1114 t = tuple_new(22); 1114 t = tuple_new(24);
1115 1115
1116 tuple_set_u64(t, 0, es->db_id); 1116 tuple_set_u64(t, 0, es->db_id);
1117 tuple_set_u64(t, 1, es->evsel->db_id); 1117 tuple_set_u64(t, 1, es->evsel->db_id);
@@ -1135,6 +1135,8 @@ static int python_export_sample(struct db_export *dbe,
1135 tuple_set_s32(t, 19, es->sample->flags & PERF_BRANCH_MASK); 1135 tuple_set_s32(t, 19, es->sample->flags & PERF_BRANCH_MASK);
1136 tuple_set_s32(t, 20, !!(es->sample->flags & PERF_IP_FLAG_IN_TX)); 1136 tuple_set_s32(t, 20, !!(es->sample->flags & PERF_IP_FLAG_IN_TX));
1137 tuple_set_u64(t, 21, es->call_path_id); 1137 tuple_set_u64(t, 21, es->call_path_id);
1138 tuple_set_u64(t, 22, es->sample->insn_cnt);
1139 tuple_set_u64(t, 23, es->sample->cyc_cnt);
1138 1140
1139 call_object(tables->sample_handler, t, "sample_table"); 1141 call_object(tables->sample_handler, t, "sample_table");
1140 1142
@@ -1173,7 +1175,7 @@ static int python_export_call_return(struct db_export *dbe,
1173 u64 comm_db_id = cr->comm ? cr->comm->db_id : 0; 1175 u64 comm_db_id = cr->comm ? cr->comm->db_id : 0;
1174 PyObject *t; 1176 PyObject *t;
1175 1177
1176 t = tuple_new(12); 1178 t = tuple_new(14);
1177 1179
1178 tuple_set_u64(t, 0, cr->db_id); 1180 tuple_set_u64(t, 0, cr->db_id);
1179 tuple_set_u64(t, 1, cr->thread->db_id); 1181 tuple_set_u64(t, 1, cr->thread->db_id);
@@ -1187,6 +1189,8 @@ static int python_export_call_return(struct db_export *dbe,
1187 tuple_set_u64(t, 9, cr->cp->parent->db_id); 1189 tuple_set_u64(t, 9, cr->cp->parent->db_id);
1188 tuple_set_s32(t, 10, cr->flags); 1190 tuple_set_s32(t, 10, cr->flags);
1189 tuple_set_u64(t, 11, cr->parent_db_id); 1191 tuple_set_u64(t, 11, cr->parent_db_id);
1192 tuple_set_u64(t, 12, cr->insn_count);
1193 tuple_set_u64(t, 13, cr->cyc_count);
1190 1194
1191 call_object(tables->call_return_handler, t, "call_return_table"); 1195 call_object(tables->call_return_handler, t, "call_return_table");
1192 1196