other versions
- bullseye 1.0.2-1
- bullseye-backports 1.5.0-1~bpo11+1
- testing 1.6.3-1
- unstable 1.6.4-1
LIBTRACEFS(3) | libtracefs Manual | LIBTRACEFS(3) |
NAME¶
libtracefs - Linux kernel trace file system library
SYNOPSIS¶
#include <tracefs.h> Locations of tracing files and directories:
char *tracefs_get_tracing_file(const char *name);
void tracefs_put_tracing_file(char *name);
const char *tracefs_tracing_dir(void); Trace instances:
struct tracefs_instance *tracefs_instance_create(const char *name);
int tracefs_instance_destroy(struct tracefs_instance *instance);
void tracefs_instance_free(struct tracefs_instance *instance);
bool tracefs_instance_is_new(struct tracefs_instance *instance);
bool tracefs_file_exists(struct tracefs_instance *instance, char *name);
bool tracefs_dir_exists(struct tracefs_instance *instance, char *name);
char *tracefs_instance_get_file(struct tracefs_instance *instance, const char *file);
char *tracefs_instance_get_dir(struct tracefs_instance *instance);
int tracefs_instance_file_write(struct tracefs_instance *instance, const char *file, const char *str);
char *tracefs_instance_file_read(struct tracefs_instance *instance, const char *file, int *psize);
const char *tracefs_instance_get_name(struct tracefs_instance *instance);
int tracefs_instances_walk(int (*callback)(const char *, void *), void *context);
bool tracefs_instance_exists(const char *name); Trace events:
char **tracefs_event_systems(const char *tracing_dir);
char **tracefs_system_events(const char *tracing_dir, const char *system);
int tracefs_iterate_raw_events(struct tep_handle *tep, struct tracefs_instance *instance, cpu_set_t *cpus, int cpu_size, int (*callback)(struct tep_event *, struct tep_record *, int, void *), void *callback_context);
struct tep_handle *tracefs_local_events(const char *tracing_dir);
struct tep_handle *tracefs_local_events_system(const char *tracing_dir, const char * const *sys_names);
int tracefs_fill_local_events(const char *tracing_dir, struct tep_handle *tep, int *parsing_failures); Trace helper functions:
void tracefs_list_free(char **list);
char **tracefs_tracers(const char *tracing_dir);
char *tracefs_get_clock(struct tracefs_instance *instance);
DESCRIPTION¶
The libtracefs(3) library provides APIs to access kernel trace file system.
FILES¶
tracefs.h
Header file to include in order to have access to the library APIs. -ltracefs
Linker switch to add when building a program that uses the library.
SEE ALSO¶
AUTHOR¶
Steven Rostedt <rostedt@goodmis.org[1]> Tzvetomir Stoyanov <tz.stoyanov@gmail.com[2]>
REPORTING BUGS¶
Report bugs to <linux-trace-devel@vger.kernel.org[3]>
LICENSE¶
libtracefs is Free Software licensed under the GNU LGPL 2.1
RESOURCES¶
https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/
COPYING¶
Copyright (C) 2020 VMware, Inc. Free use of this software is granted under the terms of the GNU Public License (GPL).
NOTES¶
- 1.
- rostedt@goodmis.org
mailto:rostedt@goodmis.org
- 2.
- tz.stoyanov@gmail.com
mailto:tz.stoyanov@gmail.com
- 3.
- linux-trace-devel@vger.kernel.org
mailto:linux-trace-devel@vger.kernel.org
01/15/2021 | libtracefs 1.0.2 |