1libtracecmd(3) 2============= 3 4NAME 5---- 6libtracecmd - trace-cmd library APIs 7 8SYNOPSIS 9-------- 10[verse] 11-- 12*#include <trace-cmd.h>* 13 14Open and close trace file: 15 struct tracecmd_input pass:[*]*tracecmd_open*(const char pass:[*]_file_, int _flags_); 16 struct tracecmd_input pass:[*]*tracecmd_open_fd*(int _fd_, int _flags_); 17 struct tracecmd_input pass:[*]*tracecmd_open_head*(const char pass:[*]_file_, int _flags_); 18 void *tracecmd_close*(struct tracecmd_input pass:[*]_handle_); 19 20Read tracing records from a trace file: 21 int *tracecmd_init_data*(struct tracecmd_input pass:[*]_handle_); 22 struct tep_record pass:[*]*tracecmd_read_cpu_first*(struct tracecmd_input pass:[*]_handle_, int _cpu_); 23 struct tep_record pass:[*]*tracecmd_read_data*(struct tracecmd_input pass:[*]_handle_, int _cpu_); 24 struct tep_record pass:[*]*tracecmd_read_at*(struct tracecmd_input pass:[*]_handle_, unsigned long long _offset_, int pass:[*]_cpu_); 25 void *tracecmd_free_record*(struct tep_record pass:[*]_record_); 26 struct tep_handle pass:[*]*tracecmd_get_tep*(struct tracecmd_input pass:[*]_handle_); 27 28Read tracing instances from a trace file: 29 int *tracecmd_buffer_instances*(struct tracecmd_input pass:[*]_handle_); 30 const char pass:[*]*tracecmd_buffer_instance_name*(struct tracecmd_input pass:[*]_handle_, int _indx_); 31 struct tracecmd_input pass:[*]*tracecmd_buffer_instance_handle*(struct tracecmd_input pass:[*]_handle_, int _indx_); 32 33Get traceing peer information from a trace file: 34 unsigned long long *tracecmd_get_traceid*(struct tracecmd_input pass:[*]_handle_); 35 int *tracecmd_get_guest_cpumap*(struct tracecmd_input pass:[*]_handle_, unsigned long long _trace_id_, const char pass:[*]pass:[*]_name_, int pass:[*]_vcpu_count_, const int pass:[*]pass:[*]_cpu_pid_); 36 37Control library logs: 38 int *tracecmd_set_loglevel*(enum tep_loglevel _level_); 39-- 40 41DESCRIPTION 42----------- 43The libtracecmd(3) library provides APIs to read, parse and write 44_trace-cmd.dat(5)_ files, recorded with _trace-cmd(1)_ application and containing 45tracing information from ftrace, the official Linux kernel tracer. 46 47FILES 48----- 49[verse] 50-- 51*trace-cmd.h* 52 Header file to include in order to have access to the library APIs. 53*-ltracecmd* 54 Linker switch to add when building a program that uses the library. 55-- 56 57SEE ALSO 58-------- 59_libtraceevent(3)_ 60_libtracefs(3)_ 61_trace-cmd(1)_ 62_trace-cmd.dat(5)_ 63 64AUTHOR 65------ 66[verse] 67-- 68*Steven Rostedt* <[email protected]> 69*Tzvetomir Stoyanov* <[email protected]> 70-- 71REPORTING BUGS 72-------------- 73Report bugs to <[email protected]> 74 75LICENSE 76------- 77libtracecmd is Free Software licensed under the GNU LGPL 2.1 78 79RESOURCES 80--------- 81https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/ 82 83COPYING 84------- 85Copyright \(C) 2020 VMware, Inc. Free use of this software is granted under 86the terms of the GNU Public License (GPL). 87