|
@@ -200,24 +200,12 @@ static int trace__run(struct trace *trace)
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
|
- evsel = perf_evsel__newtp("raw_syscalls", "sys_enter", 0);
|
|
|
- if (evsel == NULL) {
|
|
|
- printf("Couldn't read the raw_syscalls:sys_enter tracepoint information!\n");
|
|
|
+ if (perf_evlist__add_newtp(evlist, "raw_syscalls", "sys_enter", trace__sys_enter) ||
|
|
|
+ perf_evlist__add_newtp(evlist, "raw_syscalls", "sys_exit", trace__sys_exit)) {
|
|
|
+ printf("Couldn't read the raw_syscalls tracepoints information!\n");
|
|
|
goto out_delete_evlist;
|
|
|
}
|
|
|
|
|
|
- evsel->handler.func = trace__sys_enter;
|
|
|
- perf_evlist__add(evlist, evsel);
|
|
|
-
|
|
|
- evsel = perf_evsel__newtp("raw_syscalls", "sys_exit", 1);
|
|
|
- if (evsel == NULL) {
|
|
|
- printf("Couldn't read the raw_syscalls:sys_exit tracepoint information!\n");
|
|
|
- goto out_delete_evlist;
|
|
|
- }
|
|
|
-
|
|
|
- evsel->handler.func = trace__sys_exit;
|
|
|
- perf_evlist__add(evlist, evsel);
|
|
|
-
|
|
|
err = perf_evlist__create_maps(evlist, &trace->opts.target);
|
|
|
if (err < 0) {
|
|
|
printf("Problems parsing the target to trace, check your options!\n");
|