aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Google) <rostedt@goodmis.org>2022-09-21 20:29:37 -0400
committerSteven Rostedt (Google) <rostedt@goodmis.org>2022-09-21 21:52:19 -0400
commitee007a12a396ddbc0ee868940e8f90eb2daa720b (patch)
treeb8737295470a92badb0fdf6062fb2b961490f429
parentcb04105d368ed2446538d6e2b05f312e7504234f (diff)
downloadtrace-cmd-ee007a12a396ddbc0ee868940e8f90eb2daa720b.tar.gz
trace-cmd library: Make tracecmd_filter_match() local
The function tracecmd_filter_match() is really an internal function. It should not be exported for other applications (The trace-cmd core functions do not use it). It should definitely not be in the public headers. Move the prototype so that it is only used internally within the library. Link: https://lore.kernel.org/linux-trace-devel/20220922002940.3302285-3-rostedt@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r--include/trace-cmd/trace-cmd.h2
-rw-r--r--lib/trace-cmd/include/trace-cmd-local.h3
-rw-r--r--lib/trace-cmd/trace-filter.c4
3 files changed, 5 insertions, 4 deletions
diff --git a/include/trace-cmd/trace-cmd.h b/include/trace-cmd/trace-cmd.h
index b0502336..bcbf9d78 100644
--- a/include/trace-cmd/trace-cmd.h
+++ b/include/trace-cmd/trace-cmd.h
@@ -80,8 +80,6 @@ enum tracecmd_filters {
struct tracecmd_filter;
struct tracecmd_filter *tracecmd_filter_add(struct tracecmd_input *handle,
const char *filter_str, bool neg);
-enum tracecmd_filters tracecmd_filter_match(struct tracecmd_filter *filter,
- struct tep_record *record);
#ifdef __cplusplus
}
#endif
diff --git a/lib/trace-cmd/include/trace-cmd-local.h b/lib/trace-cmd/include/trace-cmd-local.h
index 2a458133..c95ec653 100644
--- a/lib/trace-cmd/include/trace-cmd-local.h
+++ b/lib/trace-cmd/include/trace-cmd-local.h
@@ -49,6 +49,9 @@ struct data_file_write {
unsigned long long file_data_offset;
};
+enum tracecmd_filters tracecmd_filter_match(struct tracecmd_filter *filter,
+ struct tep_record *record);
+
void tracecmd_compress_init(void);
void tracecmd_compress_free(void);
diff --git a/lib/trace-cmd/trace-filter.c b/lib/trace-cmd/trace-filter.c
index f7eb46c7..1c8c07fc 100644
--- a/lib/trace-cmd/trace-filter.c
+++ b/lib/trace-cmd/trace-filter.c
@@ -44,8 +44,8 @@ static bool test_stacktraces(struct tracecmd_filter *filter, struct tep_record *
test_stacktrace(filter, record, filter->user_stacktrace_id);
}
-enum tracecmd_filters tracecmd_filter_match(struct tracecmd_filter *filter,
- struct tep_record *record)
+__hidden enum tracecmd_filters tracecmd_filter_match(struct tracecmd_filter *filter,
+ struct tep_record *record)
{
bool found = false;
int ret;