[RFC][PATCH 10/19] tracing: Rename FTRACE_MAX_EVENT to TRACE_EVENT_TYPE_MAX

From: Steven Rostedt
Date: Thu May 14 2015 - 11:20:27 EST


From: "Steven Rostedt (Red Hat)" <rostedt@xxxxxxxxxxx>

The name "ftrace" really refers to the function hook infrastructure. It
is not about the trace_events. Rename the max trace_event type size to
something more descriptive and appropriate.

Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
include/linux/trace_events.h | 2 +-
kernel/trace/trace_output.c | 4 ++--
tools/perf/util/scripting-engines/trace-event-perl.c | 4 ++--
tools/perf/util/scripting-engines/trace-event-python.c | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 12ca46322a94..6f28464be418 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -68,7 +68,7 @@ struct trace_entry {
int pid;
};

-#define FTRACE_MAX_EVENT \
+#define TRACE_EVENT_TYPE_MAX \
((1 << (sizeof(((struct trace_entry *)0)->type) * 8)) - 1)

/*
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index d1a2feb54d06..74dfe2e01d68 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -675,7 +675,7 @@ static int trace_search_list(struct list_head **list)
}

/* Did we used up all 65 thousand events??? */
- if ((last + 1) > FTRACE_MAX_EVENT)
+ if ((last + 1) > TRACE_EVENT_TYPE_MAX)
return 0;

*list = &e->list;
@@ -725,7 +725,7 @@ int register_trace_event(struct trace_event *event)
if (!event->type) {
struct list_head *list = NULL;

- if (next_event_type > FTRACE_MAX_EVENT) {
+ if (next_event_type > TRACE_EVENT_TYPE_MAX) {

event->type = trace_search_list(&list);
if (!event->type)
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c
index 430b5d27828e..1bd593bbf7a5 100644
--- a/tools/perf/util/scripting-engines/trace-event-perl.c
+++ b/tools/perf/util/scripting-engines/trace-event-perl.c
@@ -55,10 +55,10 @@ void xs_init(pTHX)

INTERP my_perl;

-#define FTRACE_MAX_EVENT \
+#define TRACE_EVENT_TYPE_MAX \
((1 << (sizeof(unsigned short) * 8)) - 1)

-static DECLARE_BITMAP(events_defined, FTRACE_MAX_EVENT);
+static DECLARE_BITMAP(events_defined, TRACE_EVENT_TYPE_MAX);

extern struct scripting_context *scripting_context;

diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 5544b8cdd1ee..ace2484985cb 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -44,10 +44,10 @@

PyMODINIT_FUNC initperf_trace_context(void);

-#define FTRACE_MAX_EVENT \
+#define TRACE_EVENT_TYPE_MAX \
((1 << (sizeof(unsigned short) * 8)) - 1)

-static DECLARE_BITMAP(events_defined, FTRACE_MAX_EVENT);
+static DECLARE_BITMAP(events_defined, TRACE_EVENT_TYPE_MAX);

#define MAX_FIELDS 64
#define N_COMMON_FIELDS 7
--
2.1.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/