From a54bd42d73836eb9033a31c3f68be5b7e8612dce Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 19 Sep 2011 10:12:08 -0400 Subject: [PATCH] Rename syscalls -> syscall in UI/API/ABI For consistency with other tracing modes. Signed-off-by: Mathieu Desnoyers --- include/lttng-kernel.h | 2 +- include/lttng/lttng.h | 2 +- ltt-sessiond/ltt-sessiond.h | 1 - ltt-sessiond/main.c | 4 ++-- ltt-sessiond/trace-kernel.c | 4 ++-- lttng/commands/calibrate.c | 12 ++++++------ lttng/commands/enable_events.c | 14 +++++++------- lttng/commands/list.c | 4 ++-- 8 files changed, 21 insertions(+), 22 deletions(-) diff --git a/include/lttng-kernel.h b/include/lttng-kernel.h index 20b788fc1..475cde8cf 100644 --- a/include/lttng-kernel.h +++ b/include/lttng-kernel.h @@ -39,7 +39,7 @@ enum lttng_kernel_instrumentation { LTTNG_KERNEL_FUNCTION = 2, LTTNG_KERNEL_KRETPROBE = 3, LTTNG_KERNEL_NOOP = 4, /* not hooked */ - LTTNG_KERNEL_SYSCALLS = 5, + LTTNG_KERNEL_SYSCALL = 5, }; enum lttng_kernel_context_type { diff --git a/include/lttng/lttng.h b/include/lttng/lttng.h index efb67fa69..bde46fa60 100644 --- a/include/lttng/lttng.h +++ b/include/lttng/lttng.h @@ -66,7 +66,7 @@ enum lttng_event_type { LTTNG_EVENT_FUNCTION, LTTNG_EVENT_FUNCTION_ENTRY, LTTNG_EVENT_NOOP, - LTTNG_EVENT_SYSCALLS, + LTTNG_EVENT_SYSCALL, }; /* diff --git a/ltt-sessiond/ltt-sessiond.h b/ltt-sessiond/ltt-sessiond.h index 63ef6d57d..617ca54c4 100644 --- a/ltt-sessiond/ltt-sessiond.h +++ b/ltt-sessiond/ltt-sessiond.h @@ -56,7 +56,6 @@ const struct module_param kernel_modules_list[] = { { "lttng-probe-irq", 0 }, { "lttng-probe-kvm", 0 }, { "lttng-probe-sched", 0 }, - { "lttng-probe-syscalls", 0 }, }; extern const char default_home_dir[], diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index 5a0ad0b8a..c85ff0351 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -1716,8 +1716,8 @@ static void list_lttng_events(struct ltt_kernel_channel *kchan, case LTTNG_KERNEL_NOOP: events[i].type = LTTNG_EVENT_NOOP; break; - case LTTNG_KERNEL_SYSCALLS: - events[i].type = LTTNG_EVENT_SYSCALLS; + case LTTNG_KERNEL_SYSCALL: + events[i].type = LTTNG_EVENT_SYSCALL; break; } i++; diff --git a/ltt-sessiond/trace-kernel.c b/ltt-sessiond/trace-kernel.c index b84021262..37d9d143a 100644 --- a/ltt-sessiond/trace-kernel.c +++ b/ltt-sessiond/trace-kernel.c @@ -204,8 +204,8 @@ struct ltt_kernel_event *trace_kernel_create_event(struct lttng_event *ev) case LTTNG_EVENT_TRACEPOINT: attr->instrumentation = LTTNG_KERNEL_TRACEPOINT; break; - case LTTNG_EVENT_SYSCALLS: - attr->instrumentation = LTTNG_KERNEL_SYSCALLS; + case LTTNG_EVENT_SYSCALL: + attr->instrumentation = LTTNG_KERNEL_SYSCALL; break; default: ERR("Unknown kernel instrumentation type (%d)", ev->type); diff --git a/lttng/commands/calibrate.c b/lttng/commands/calibrate.c index bcddc5e8b..e17a2fd73 100644 --- a/lttng/commands/calibrate.c +++ b/lttng/commands/calibrate.c @@ -47,7 +47,7 @@ enum { OPT_PROBE, OPT_FUNCTION, OPT_FUNCTION_ENTRY, - OPT_SYSCALLS, + OPT_SYSCALL, }; static struct lttng_handle *handle; @@ -64,7 +64,7 @@ static struct poptOption long_options[] = { {"probe", 0, POPT_ARG_NONE, 0, OPT_PROBE, 0, 0}, {"function", 0, POPT_ARG_NONE, 0, OPT_FUNCTION, 0, 0}, {"function:entry", 0, POPT_ARG_NONE, 0, OPT_FUNCTION_ENTRY, 0, 0}, - {"syscalls", 0, POPT_ARG_NONE, 0, OPT_SYSCALLS, 0, 0}, + {"syscall", 0, POPT_ARG_NONE, 0, OPT_SYSCALL, 0, 0}, {0, 0, 0, 0, 0, 0, 0} }; @@ -89,7 +89,7 @@ static void usage(FILE *ofp) fprintf(ofp, " Dynamic function entry/return probe.\n"); fprintf(ofp, " --function:entry symbol\n"); fprintf(ofp, " Function tracer event\n"); - fprintf(ofp, " --syscalls System calls\n"); + fprintf(ofp, " --syscall System call eventl\n"); fprintf(ofp, " --marker User-space marker (deprecated)\n"); fprintf(ofp, "\n"); } @@ -133,8 +133,8 @@ static int calibrate_lttng(void) case LTTNG_EVENT_FUNCTION_ENTRY: DBG("Calibrating kernel function entry"); break; - case LTTNG_EVENT_SYSCALLS: - DBG("Calibrating kernel syscalls"); + case LTTNG_EVENT_SYSCALL: + DBG("Calibrating kernel syscall"); break; default: ret = CMD_NOT_IMPLEMENTED; @@ -200,7 +200,7 @@ int cmd_calibrate(int argc, const char **argv) case OPT_FUNCTION_ENTRY: ret = CMD_NOT_IMPLEMENTED; break; - case OPT_SYSCALLS: + case OPT_SYSCALL: ret = CMD_NOT_IMPLEMENTED; break; default: diff --git a/lttng/commands/enable_events.c b/lttng/commands/enable_events.c index 0d47b6291..85fd86a08 100644 --- a/lttng/commands/enable_events.c +++ b/lttng/commands/enable_events.c @@ -53,7 +53,7 @@ enum { OPT_PROBE, OPT_FUNCTION, OPT_FUNCTION_ENTRY, - OPT_SYSCALLS, + OPT_SYSCALL, }; static struct lttng_handle *handle; @@ -73,7 +73,7 @@ static struct poptOption long_options[] = { {"probe", 0, POPT_ARG_STRING, 0, OPT_PROBE, 0, 0}, {"function", 0, POPT_ARG_STRING, 0, OPT_FUNCTION, 0, 0}, {"function:entry", 0, POPT_ARG_STRING, 0, OPT_FUNCTION_ENTRY, 0, 0}, - {"syscalls", 0, POPT_ARG_NONE, 0, OPT_SYSCALLS, 0, 0}, + {"syscall", 0, POPT_ARG_NONE, 0, OPT_SYSCALL, 0, 0}, {0, 0, 0, 0, 0, 0, 0} }; @@ -105,7 +105,7 @@ static void usage(FILE *ofp) fprintf(ofp, " decimal (NNN...) or hexadecimal (0xNNN...)\n"); fprintf(ofp, " --function:entry symbol\n"); fprintf(ofp, " Function tracer event\n"); - fprintf(ofp, " --syscalls System calls\n"); + fprintf(ofp, " --syscall System call event\n"); fprintf(ofp, " --marker User-space marker (deprecated)\n"); fprintf(ofp, "\n"); } @@ -224,7 +224,7 @@ static int enable_events(char *session_name) } /* TODO: User-space tracer */ break; - case LTTNG_EVENT_SYSCALLS: + case LTTNG_EVENT_SYSCALL: if (opt_kernel) { ev.name[0] = '\0'; ev.type = opt_event_type; @@ -279,7 +279,7 @@ static int enable_events(char *session_name) LTTNG_SYMBOL_NAME_LEN); ev.attr.ftrace.symbol_name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0'; break; - case LTTNG_EVENT_SYSCALLS: + case LTTNG_EVENT_SYSCALL: MSG("per-syscall selection not supported yet. Use \"-a\" for all syscalls."); ret = CMD_NOT_IMPLEMENTED; goto error; @@ -364,8 +364,8 @@ int cmd_enable_events(int argc, const char **argv) opt_event_type = LTTNG_EVENT_FUNCTION_ENTRY; opt_function_entry_symbol = poptGetOptArg(pc); break; - case OPT_SYSCALLS: - opt_event_type = LTTNG_EVENT_SYSCALLS; + case OPT_SYSCALL: + opt_event_type = LTTNG_EVENT_SYSCALL; break; default: usage(stderr); diff --git a/lttng/commands/list.c b/lttng/commands/list.c index f4636985f..c73ea74dc 100644 --- a/lttng/commands/list.c +++ b/lttng/commands/list.c @@ -177,8 +177,8 @@ static int list_events(const char *channel_name) events[i].name, events[i].enabled); MSG("%ssymbol: \"%s\"", indent8, events[i].attr.ftrace.symbol_name); break; - case LTTNG_EVENT_SYSCALLS: - MSG("%s (type: syscalls) [enabled: %d]", indent6, + case LTTNG_EVENT_SYSCALL: + MSG("%s (type: syscall) [enabled: %d]", indent6, events[i].enabled); break; case LTTNG_EVENT_NOOP: -- 2.34.1