diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-02-25 15:55:59 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-02-25 15:55:59 -0500 |
commit | f549556eb0c6bb7388e93cfd9b919b839e52a882 (patch) | |
tree | d3776882153d39868b43fde1a9be6c6247f5074a | |
parent | 5a925d4579b00f74a013f792e21a5586269206ff (diff) |
trace-cmd: Add tracecmd_create_init_fd_glob()
Add a way to create a trace.dat file from a file descriptor and
limit the events that are used.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-cmd.h | 2 | ||||
-rw-r--r-- | trace-output.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/trace-cmd.h b/trace-cmd.h index e9b4f27..b3cc6b4 100644 --- a/trace-cmd.h +++ b/trace-cmd.h | |||
@@ -180,6 +180,8 @@ struct tracecmd_output * | |||
180 | tracecmd_create_init_file_glob(const char *output_file, | 180 | tracecmd_create_init_file_glob(const char *output_file, |
181 | struct tracecmd_event_list *list); | 181 | struct tracecmd_event_list *list); |
182 | struct tracecmd_output *tracecmd_create_init_fd(int fd); | 182 | struct tracecmd_output *tracecmd_create_init_fd(int fd); |
183 | struct tracecmd_output * | ||
184 | tracecmd_create_init_fd_glob(int fd, struct tracecmd_event_list *list); | ||
183 | struct tracecmd_output *tracecmd_create_init_file(const char *output_file); | 185 | struct tracecmd_output *tracecmd_create_init_file(const char *output_file); |
184 | struct tracecmd_output *tracecmd_create_init_file_override(const char *output_file, | 186 | struct tracecmd_output *tracecmd_create_init_file_override(const char *output_file, |
185 | const char *tracing_dir, | 187 | const char *tracing_dir, |
diff --git a/trace-output.c b/trace-output.c index b91e1ac..9df5394 100644 --- a/trace-output.c +++ b/trace-output.c | |||
@@ -1095,6 +1095,12 @@ struct tracecmd_output *tracecmd_create_init_fd(int fd) | |||
1095 | } | 1095 | } |
1096 | 1096 | ||
1097 | struct tracecmd_output * | 1097 | struct tracecmd_output * |
1098 | tracecmd_create_init_fd_glob(int fd, struct tracecmd_event_list *list) | ||
1099 | { | ||
1100 | return create_file_fd(fd, NULL, NULL, NULL, list); | ||
1101 | } | ||
1102 | |||
1103 | struct tracecmd_output * | ||
1098 | tracecmd_create_init_file_glob(const char *output_file, | 1104 | tracecmd_create_init_file_glob(const char *output_file, |
1099 | struct tracecmd_event_list *list) | 1105 | struct tracecmd_event_list *list) |
1100 | { | 1106 | { |