perf trace: Rename some syscall_tp methods to raw_syscall

Because raw_syscalls have the field for the syscall number as 'id' while
the syscalls:sys_{enter,exit}_NAME have it as __syscall_nr...

Since we want to support both for being able to enable just a
syscalls:sys_{enter,exit}_name instead of asking for
raw_syscalls:sys_{enter,exit} plus filters, make the method names for
each kind of tracepoint more explicit.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-4rixbfzco6tsry0w9ghx3ktb@git.kernel.orgSignef-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent a98392bb
...@@ -239,7 +239,7 @@ static void perf_evsel__delete_priv(struct perf_evsel *evsel) ...@@ -239,7 +239,7 @@ static void perf_evsel__delete_priv(struct perf_evsel *evsel)
perf_evsel__delete(evsel); perf_evsel__delete(evsel);
} }
static int perf_evsel__init_syscall_tp(struct perf_evsel *evsel, void *handler) static int perf_evsel__init_raw_syscall_tp(struct perf_evsel *evsel, void *handler)
{ {
evsel->priv = malloc(sizeof(struct syscall_tp)); evsel->priv = malloc(sizeof(struct syscall_tp));
if (evsel->priv != NULL) { if (evsel->priv != NULL) {
...@@ -257,7 +257,7 @@ static int perf_evsel__init_syscall_tp(struct perf_evsel *evsel, void *handler) ...@@ -257,7 +257,7 @@ static int perf_evsel__init_syscall_tp(struct perf_evsel *evsel, void *handler)
return -ENOENT; return -ENOENT;
} }
static struct perf_evsel *perf_evsel__syscall_newtp(const char *direction, void *handler) static struct perf_evsel *perf_evsel__raw_syscall_newtp(const char *direction, void *handler)
{ {
struct perf_evsel *evsel = perf_evsel__newtp("raw_syscalls", direction); struct perf_evsel *evsel = perf_evsel__newtp("raw_syscalls", direction);
...@@ -268,7 +268,7 @@ static struct perf_evsel *perf_evsel__syscall_newtp(const char *direction, void ...@@ -268,7 +268,7 @@ static struct perf_evsel *perf_evsel__syscall_newtp(const char *direction, void
if (IS_ERR(evsel)) if (IS_ERR(evsel))
return NULL; return NULL;
if (perf_evsel__init_syscall_tp(evsel, handler)) if (perf_evsel__init_raw_syscall_tp(evsel, handler))
goto out_delete; goto out_delete;
return evsel; return evsel;
...@@ -2288,14 +2288,14 @@ static int trace__add_syscall_newtp(struct trace *trace) ...@@ -2288,14 +2288,14 @@ static int trace__add_syscall_newtp(struct trace *trace)
struct perf_evlist *evlist = trace->evlist; struct perf_evlist *evlist = trace->evlist;
struct perf_evsel *sys_enter, *sys_exit; struct perf_evsel *sys_enter, *sys_exit;
sys_enter = perf_evsel__syscall_newtp("sys_enter", trace__sys_enter); sys_enter = perf_evsel__raw_syscall_newtp("sys_enter", trace__sys_enter);
if (sys_enter == NULL) if (sys_enter == NULL)
goto out; goto out;
if (perf_evsel__init_sc_tp_ptr_field(sys_enter, args)) if (perf_evsel__init_sc_tp_ptr_field(sys_enter, args))
goto out_delete_sys_enter; goto out_delete_sys_enter;
sys_exit = perf_evsel__syscall_newtp("sys_exit", trace__sys_exit); sys_exit = perf_evsel__raw_syscall_newtp("sys_exit", trace__sys_exit);
if (sys_exit == NULL) if (sys_exit == NULL)
goto out_delete_sys_enter; goto out_delete_sys_enter;
...@@ -2717,7 +2717,7 @@ static int trace__replay(struct trace *trace) ...@@ -2717,7 +2717,7 @@ static int trace__replay(struct trace *trace)
"syscalls:sys_enter"); "syscalls:sys_enter");
if (evsel && if (evsel &&
(perf_evsel__init_syscall_tp(evsel, trace__sys_enter) < 0 || (perf_evsel__init_raw_syscall_tp(evsel, trace__sys_enter) < 0 ||
perf_evsel__init_sc_tp_ptr_field(evsel, args))) { perf_evsel__init_sc_tp_ptr_field(evsel, args))) {
pr_err("Error during initialize raw_syscalls:sys_enter event\n"); pr_err("Error during initialize raw_syscalls:sys_enter event\n");
goto out; goto out;
...@@ -2729,7 +2729,7 @@ static int trace__replay(struct trace *trace) ...@@ -2729,7 +2729,7 @@ static int trace__replay(struct trace *trace)
evsel = perf_evlist__find_tracepoint_by_name(session->evlist, evsel = perf_evlist__find_tracepoint_by_name(session->evlist,
"syscalls:sys_exit"); "syscalls:sys_exit");
if (evsel && if (evsel &&
(perf_evsel__init_syscall_tp(evsel, trace__sys_exit) < 0 || (perf_evsel__init_raw_syscall_tp(evsel, trace__sys_exit) < 0 ||
perf_evsel__init_sc_tp_uint_field(evsel, ret))) { perf_evsel__init_sc_tp_uint_field(evsel, ret))) {
pr_err("Error during initialize raw_syscalls:sys_exit event\n"); pr_err("Error during initialize raw_syscalls:sys_exit event\n");
goto out; goto out;
......
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