@@ -240,10 +240,13 @@ TEST_LIBTRACEEVENT = $(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEEVENT) > /d
TEST_LIBTRACEFS = $(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEFS) > /dev/null 2>&1 && echo y")
endif
+# My get overwritten if libtraceveent is 1.3 or greater.
+TEP_WARNING = -Dpr_info=pr_stat
+
ifeq ("$(TEST_LIBTRACEEVENT)", "y")
TRACEEVENT_V13 = $(shell sh -c "$(PKG_CONFIG) --atleast-version 1.3 $(LIBTRACEEVENT) > /dev/null 2>&1 && echo y")
ifeq ("$(TRACEEVENT_V13)", "y")
- TEP_WARNING=-Dwarning=tep_warning
+ TEP_WARNING = -Dwarning=tep_warning -Dpr_info=tep_info
endif
LIBTRACEEVENT_CFLAGS = $(shell sh -c "$(PKG_CONFIG) --cflags $(LIBTRACEEVENT)") $(TEP_WARNING)
LIBTRACEEVENT_LDLAGS = $(shell sh -c "$(PKG_CONFIG) --libs $(LIBTRACEEVENT)")
@@ -3170,7 +3170,7 @@ struct tracecmd_input *tracecmd_alloc_fd(int fd, int flags)
version = read_string(handle);
if (!version)
goto failed_read;
- pr_stat("version = %s\n", version);
+ pr_info("version = %s\n", version);
free(version);
if (do_read_check(handle, buf, 1))
@@ -140,7 +140,7 @@ load_plugin(struct trace_plugin_context *trace, const char *path,
list->name = plugin;
*plugin_list = list;
- pr_stat("registering plugin: %s", plugin);
+ pr_info("registering plugin: %s", plugin);
func(trace);
return;
@@ -6764,7 +6764,7 @@ static int find_event_handle(struct tep_handle *tep, struct tep_event *event)
if (!(*next))
return 0;
- pr_stat("overriding event (%d) %s:%s with new print handler",
+ pr_info("overriding event (%d) %s:%s with new print handler",
event->id, event->system, event->name);
event->handler = handle->func;
@@ -7241,7 +7241,7 @@ int tep_register_print_function(struct tep_handle *tep,
* plugins updating the function. This overrides the
* system defaults.
*/
- pr_stat("override of function helper '%s'", name);
+ pr_info("override of function helper '%s'", name);
remove_func_handler(tep, name);
}
@@ -7379,7 +7379,7 @@ int tep_register_event_handler(struct tep_handle *tep, int id,
if (event == NULL)
goto not_found;
- pr_stat("overriding event (%d) %s:%s with new print handler",
+ pr_info("overriding event (%d) %s:%s with new print handler",
event->id, event->system, event->name);
event->handler = func;
@@ -7465,7 +7465,7 @@ int tep_unregister_event_handler(struct tep_handle *tep, int id,
goto not_found;
if (event->handler == func && event->context == context) {
- pr_stat("removing override handler for event (%d) %s:%s. Going back to default handler.",
+ pr_info("removing override handler for event (%d) %s:%s. Going back to default handler.",
event->id, event->system, event->name);
event->handler = NULL;
@@ -498,7 +498,7 @@ load_plugin(struct tep_handle *tep, const char *path,
list->name = plugin;
*plugin_list = list;
- pr_stat("registering plugin: %s", plugin);
+ pr_info("registering plugin: %s", plugin);
func(tep);
return;
@@ -10,7 +10,7 @@
/* Can be overridden */
void warning(const char *fmt, ...);
-void pr_stat(const char *fmt, ...);
+void pr_info(const char *fmt, ...);
void vpr_stat(const char *fmt, va_list ap);
/* Always available */
@@ -57,6 +57,6 @@ void __weak vpr_stat(const char *fmt, va_list ap)
{
}
-void __weak pr_stat(const char *fmt, ...)
+void __weak pr_info(const char *fmt, ...)
{
}
@@ -44,14 +44,14 @@ static void py_supress_trace_output(void)
skip_output = 1;
}
-void pr_stat(const char *fmt, ...)
+void pr_info(const char *fmt, ...)
{
va_list ap;
if (skip_output)
return;
va_start(ap, fmt);
- __vpr_stat(fmt, ap);
+ __vpr_info(fmt, ap);
va_end(ap);
}
@@ -249,7 +249,7 @@ static int python_callback(struct trace_seq *s,
%ignore trace_seq_vprintf;
-%ignore vpr_stat;
+%ignore vpr_info;
/* SWIG can't grok these, define them to nothing */
#define __trace
@@ -35,7 +35,7 @@ void warning(const char *fmt, ...)
fprintf(stderr, "\n");
}
-void pr_stat(const char *fmt, ...)
+void pr_info(const char *fmt, ...)
{
va_list ap;
@@ -2940,7 +2940,7 @@ static int expand_event_files(struct buffer_instance *instance,
path = globbuf.gl_pathv[i];
event = create_event(instance, path, old_event);
- pr_stat("%s\n", path);
+ pr_info("%s\n", path);
len = strlen(path);