return 0;
}
-static int evsel__process_alloc_event(struct evsel *evsel, struct perf_sample *sample)
+static int evsel__process_alloc_event(struct perf_sample *sample)
{
unsigned long ptr = perf_sample__intval(sample, "ptr"),
call_site = perf_sample__intval(sample, "call_site");
* If the tracepoint contains the field "node" the tool stats the
* cross allocation.
*/
- if (evsel__field(evsel, "node")) {
+ if (evsel__field(sample->evsel, "node")) {
int node1, node2;
node1 = cpu__get_node((struct perf_cpu){.cpu = sample->cpu});
return NULL;
}
-static int evsel__process_free_event(struct evsel *evsel __maybe_unused, struct perf_sample *sample)
+static int evsel__process_free_event(struct perf_sample *sample)
{
unsigned long ptr = perf_sample__intval(sample, "ptr");
struct alloc_stat *s_alloc, *s_caller;
return NULL;
}
-static int parse_gfp_flags(struct evsel *evsel, struct perf_sample *sample,
- unsigned int gfp_flags)
+static int parse_gfp_flags(struct perf_sample *sample, unsigned int gfp_flags)
{
struct tep_record record = {
.cpu = sample->cpu,
}
trace_seq_init(&seq);
- tp_format = evsel__tp_format(evsel);
+ tp_format = evsel__tp_format(sample->evsel);
if (tp_format)
tep_print_event(tp_format->tep, &seq, &record, "%s", TEP_PRINT_INFO);
return 0;
}
-static int evsel__process_page_alloc_event(struct evsel *evsel, struct perf_sample *sample)
+static int evsel__process_page_alloc_event(struct perf_sample *sample)
{
u64 page;
unsigned int order = perf_sample__intval(sample, "order");
return 0;
}
- if (parse_gfp_flags(evsel, sample, gfp_flags) < 0)
+ if (parse_gfp_flags(sample, gfp_flags) < 0)
return -1;
callsite = find_callsite(sample);
return 0;
}
-static int evsel__process_page_free_event(struct evsel *evsel __maybe_unused,
- struct perf_sample *sample)
+static int evsel__process_page_free_event(struct perf_sample *sample)
{
u64 page;
unsigned int order = perf_sample__intval(sample, "order");
return false;
}
-typedef int (*tracepoint_handler)(struct evsel *evsel,
- struct perf_sample *sample);
+typedef int (*tracepoint_handler)(struct perf_sample *sample);
static int process_sample_event(const struct perf_tool *tool __maybe_unused,
union perf_event *event,
return -1;
}
- if (perf_kmem__skip_sample(sample))
+ if (perf_kmem__skip_sample(sample)) {
return 0;
+ }
dump_printf(" ... thread: %s:%d\n", thread__comm_str(thread), thread__tid(thread));
if (evsel->handler != NULL) {
tracepoint_handler f = evsel->handler;
- err = f(evsel, sample);
+ err = f(sample);
}
thread__put(thread);