Commit 64e23790 authored by Tzvetomir Stoyanov (VMware)'s avatar Tzvetomir Stoyanov (VMware) Committed by Arnaldo Carvalho de Melo

tools lib traceevent: Rename pevent_filter* APIs

In order to make libtraceevent into a proper library, variables, data
structures and functions require a unique prefix to prevent name space
conflicts. That prefix will be "tep_" and not "pevent_". This changes
APIs: PEVENT_FILTER_ERROR_BUFSZ, pevent_filter_alloc,
pevent_filter_add_filter_str, pevent_filter_match, pevent_filter_strerror,
pevent_event_filtered, pevent_filter_reset, pevent_filter_clear_trivial,
pevent_filter_free, pevent_filter_make_string, pevent_filter_remove_event,
pevent_filter_event_has_trivial, pevent_filter_copy, pevent_update_trivial,
pevent_filter_compare
Signed-off-by: default avatarTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lkml.kernel.org/r/20180808180702.370659353@goodmis.orgSigned-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent ca2921dd
...@@ -930,16 +930,16 @@ struct filter_type { ...@@ -930,16 +930,16 @@ struct filter_type {
struct filter_arg *filter; struct filter_arg *filter;
}; };
#define PEVENT_FILTER_ERROR_BUFSZ 1024 #define TEP_FILTER_ERROR_BUFSZ 1024
struct event_filter { struct event_filter {
struct tep_handle *pevent; struct tep_handle *pevent;
int filters; int filters;
struct filter_type *event_filters; struct filter_type *event_filters;
char error_buffer[PEVENT_FILTER_ERROR_BUFSZ]; char error_buffer[TEP_FILTER_ERROR_BUFSZ];
}; };
struct event_filter *pevent_filter_alloc(struct tep_handle *pevent); struct event_filter *tep_filter_alloc(struct tep_handle *pevent);
/* for backward compatibility */ /* for backward compatibility */
#define FILTER_NONE TEP_ERRNO__NO_FILTER #define FILTER_NONE TEP_ERRNO__NO_FILTER
...@@ -953,39 +953,39 @@ enum filter_trivial_type { ...@@ -953,39 +953,39 @@ enum filter_trivial_type {
FILTER_TRIVIAL_BOTH, FILTER_TRIVIAL_BOTH,
}; };
enum tep_errno pevent_filter_add_filter_str(struct event_filter *filter, enum tep_errno tep_filter_add_filter_str(struct event_filter *filter,
const char *filter_str); const char *filter_str);
enum tep_errno pevent_filter_match(struct event_filter *filter, enum tep_errno tep_filter_match(struct event_filter *filter,
struct tep_record *record); struct tep_record *record);
int pevent_filter_strerror(struct event_filter *filter, enum tep_errno err, int tep_filter_strerror(struct event_filter *filter, enum tep_errno err,
char *buf, size_t buflen); char *buf, size_t buflen);
int pevent_event_filtered(struct event_filter *filter, int tep_event_filtered(struct event_filter *filter,
int event_id); int event_id);
void pevent_filter_reset(struct event_filter *filter); void tep_filter_reset(struct event_filter *filter);
int pevent_filter_clear_trivial(struct event_filter *filter, int tep_filter_clear_trivial(struct event_filter *filter,
enum filter_trivial_type type); enum filter_trivial_type type);
void pevent_filter_free(struct event_filter *filter); void tep_filter_free(struct event_filter *filter);
char *pevent_filter_make_string(struct event_filter *filter, int event_id); char *tep_filter_make_string(struct event_filter *filter, int event_id);
int pevent_filter_remove_event(struct event_filter *filter, int tep_filter_remove_event(struct event_filter *filter,
int event_id); int event_id);
int pevent_filter_event_has_trivial(struct event_filter *filter, int tep_filter_event_has_trivial(struct event_filter *filter,
int event_id, int event_id,
enum filter_trivial_type type); enum filter_trivial_type type);
int pevent_filter_copy(struct event_filter *dest, struct event_filter *source); int tep_filter_copy(struct event_filter *dest, struct event_filter *source);
int pevent_update_trivial(struct event_filter *dest, struct event_filter *source, int tep_update_trivial(struct event_filter *dest, struct event_filter *source,
enum filter_trivial_type type); enum filter_trivial_type type);
int pevent_filter_compare(struct event_filter *filter1, struct event_filter *filter2); int tep_filter_compare(struct event_filter *filter1, struct event_filter *filter2);
#endif /* _PARSE_EVENTS_H */ #endif /* _PARSE_EVENTS_H */
This diff is collapsed.
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