Commit 52a2ab6f authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf db-export: Export IPC information

Export cycle and instruction counts on samples and call-returns.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190520113728.14389-16-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 1159face
...@@ -1111,7 +1111,7 @@ static int python_export_sample(struct db_export *dbe, ...@@ -1111,7 +1111,7 @@ static int python_export_sample(struct db_export *dbe,
struct tables *tables = container_of(dbe, struct tables, dbe); struct tables *tables = container_of(dbe, struct tables, dbe);
PyObject *t; PyObject *t;
t = tuple_new(22); t = tuple_new(24);
tuple_set_u64(t, 0, es->db_id); tuple_set_u64(t, 0, es->db_id);
tuple_set_u64(t, 1, es->evsel->db_id); tuple_set_u64(t, 1, es->evsel->db_id);
...@@ -1135,6 +1135,8 @@ static int python_export_sample(struct db_export *dbe, ...@@ -1135,6 +1135,8 @@ static int python_export_sample(struct db_export *dbe,
tuple_set_s32(t, 19, es->sample->flags & PERF_BRANCH_MASK); tuple_set_s32(t, 19, es->sample->flags & PERF_BRANCH_MASK);
tuple_set_s32(t, 20, !!(es->sample->flags & PERF_IP_FLAG_IN_TX)); tuple_set_s32(t, 20, !!(es->sample->flags & PERF_IP_FLAG_IN_TX));
tuple_set_u64(t, 21, es->call_path_id); tuple_set_u64(t, 21, es->call_path_id);
tuple_set_u64(t, 22, es->sample->insn_cnt);
tuple_set_u64(t, 23, es->sample->cyc_cnt);
call_object(tables->sample_handler, t, "sample_table"); call_object(tables->sample_handler, t, "sample_table");
...@@ -1173,7 +1175,7 @@ static int python_export_call_return(struct db_export *dbe, ...@@ -1173,7 +1175,7 @@ static int python_export_call_return(struct db_export *dbe,
u64 comm_db_id = cr->comm ? cr->comm->db_id : 0; u64 comm_db_id = cr->comm ? cr->comm->db_id : 0;
PyObject *t; PyObject *t;
t = tuple_new(12); t = tuple_new(14);
tuple_set_u64(t, 0, cr->db_id); tuple_set_u64(t, 0, cr->db_id);
tuple_set_u64(t, 1, cr->thread->db_id); tuple_set_u64(t, 1, cr->thread->db_id);
...@@ -1187,6 +1189,8 @@ static int python_export_call_return(struct db_export *dbe, ...@@ -1187,6 +1189,8 @@ static int python_export_call_return(struct db_export *dbe,
tuple_set_u64(t, 9, cr->cp->parent->db_id); tuple_set_u64(t, 9, cr->cp->parent->db_id);
tuple_set_s32(t, 10, cr->flags); tuple_set_s32(t, 10, cr->flags);
tuple_set_u64(t, 11, cr->parent_db_id); tuple_set_u64(t, 11, cr->parent_db_id);
tuple_set_u64(t, 12, cr->insn_count);
tuple_set_u64(t, 13, cr->cyc_count);
call_object(tables->call_return_handler, t, "call_return_table"); call_object(tables->call_return_handler, t, "call_return_table");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment