trace-cmd: New libtracefs APIs for ftrace instances
The functionality related to ftrace instances is moved from
trace-cmd application to libtracefs. The following new
library APIs are introduced:
struct tracefs_instance;
struct tracefs_instance *tracefs_alloc_instance(const char *name);
int tracefs_free_instance(struct tracefs_instance *instance);
int tracefs_make_instance(struct tracefs_instance *instance);
int tracefs_remove_instance(struct tracefs_instance *instance);
char *tracefs_get_instance_name(struct tracefs_instance *instance);
char *tracefs_get_instance_file(struct tracefs_instance *instance, const char *file);
char *tracefs_get_instance_dir(struct tracefs_instance *instance);
int tracefs_write_instance_file(struct tracefs_instance *instance,
const char *file, const char *str, const char *type);
char *tracefs_read_instance_file(struct tracefs_instance *instance, char *file, int *psize);
Link: http://lore.kernel.org/linux-trace-devel/20200117135544.598235-3-tz.stoyanov@gmail.com
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
10 files changed