|
@@ -381,7 +381,6 @@ exit:
|
|
|
|
|
|
static void python_process_tracepoint(struct perf_sample *sample,
|
|
|
struct perf_evsel *evsel,
|
|
|
- struct thread *thread,
|
|
|
struct addr_location *al)
|
|
|
{
|
|
|
struct event_format *event = evsel->tp_format;
|
|
@@ -395,7 +394,7 @@ static void python_process_tracepoint(struct perf_sample *sample,
|
|
|
int cpu = sample->cpu;
|
|
|
void *data = sample->raw_data;
|
|
|
unsigned long long nsecs = sample->time;
|
|
|
- const char *comm = thread__comm_str(thread);
|
|
|
+ const char *comm = thread__comm_str(al->thread);
|
|
|
|
|
|
t = PyTuple_New(MAX_FIELDS);
|
|
|
if (!t)
|
|
@@ -766,7 +765,6 @@ static int python_process_call_return(struct call_return *cr, void *data)
|
|
|
|
|
|
static void python_process_general_event(struct perf_sample *sample,
|
|
|
struct perf_evsel *evsel,
|
|
|
- struct thread *thread,
|
|
|
struct addr_location *al)
|
|
|
{
|
|
|
PyObject *handler, *t, *dict, *callchain, *dict_sample;
|
|
@@ -816,7 +814,7 @@ static void python_process_general_event(struct perf_sample *sample,
|
|
|
pydict_set_item_string_decref(dict, "raw_buf", PyString_FromStringAndSize(
|
|
|
(const char *)sample->raw_data, sample->raw_size));
|
|
|
pydict_set_item_string_decref(dict, "comm",
|
|
|
- PyString_FromString(thread__comm_str(thread)));
|
|
|
+ PyString_FromString(thread__comm_str(al->thread)));
|
|
|
if (al->map) {
|
|
|
pydict_set_item_string_decref(dict, "dso",
|
|
|
PyString_FromString(al->map->dso->name));
|
|
@@ -843,22 +841,21 @@ exit:
|
|
|
static void python_process_event(union perf_event *event,
|
|
|
struct perf_sample *sample,
|
|
|
struct perf_evsel *evsel,
|
|
|
- struct thread *thread,
|
|
|
struct addr_location *al)
|
|
|
{
|
|
|
struct tables *tables = &tables_global;
|
|
|
|
|
|
switch (evsel->attr.type) {
|
|
|
case PERF_TYPE_TRACEPOINT:
|
|
|
- python_process_tracepoint(sample, evsel, thread, al);
|
|
|
+ python_process_tracepoint(sample, evsel, al);
|
|
|
break;
|
|
|
/* Reserve for future process_hw/sw/raw APIs */
|
|
|
default:
|
|
|
if (tables->db_export_mode)
|
|
|
db_export__sample(&tables->dbe, event, sample, evsel,
|
|
|
- thread, al);
|
|
|
+ al->thread, al);
|
|
|
else
|
|
|
- python_process_general_event(sample, evsel, thread, al);
|
|
|
+ python_process_general_event(sample, evsel, al);
|
|
|
}
|
|
|
}
|
|
|
|