aboutsummaryrefslogtreecommitdiff
path: root/Documentation/libtracecmd/libtracecmd.txt
blob: dc528ce02aac9ef9b17899195e141305e5702fdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
libtracecmd(3)
=============

NAME
----
libtracecmd - trace-cmd library APIs

SYNOPSIS
--------
[verse]
--
*#include <trace-cmd.h>*

Open and close trace file:
	struct tracecmd_input pass:[*]*tracecmd_open*(const char pass:[*]_file_, int _flags_);
	struct tracecmd_input pass:[*]*tracecmd_open_fd*(int _fd_, int _flags_);
	struct tracecmd_input pass:[*]*tracecmd_open_head*(const char pass:[*]_file_, int _flags_);
	void *tracecmd_close*(struct tracecmd_input pass:[*]_handle_);

Read tracing records from a trace file:
	int *tracecmd_init_data*(struct tracecmd_input pass:[*]_handle_);
	struct tep_record pass:[*]*tracecmd_read_cpu_first*(struct tracecmd_input pass:[*]_handle_, int _cpu_);
	struct tep_record pass:[*]*tracecmd_read_data*(struct tracecmd_input pass:[*]_handle_, int _cpu_);
	struct tep_record pass:[*]*tracecmd_read_at*(struct tracecmd_input pass:[*]_handle_, unsigned long long _offset_, int pass:[*]_cpu_);
	void *tracecmd_free_record*(struct tep_record pass:[*]_record_);
	struct tep_handle pass:[*]*tracecmd_get_tep*(struct tracecmd_input pass:[*]_handle_);

Read tracing instances from a trace file:
	int *tracecmd_buffer_instances*(struct tracecmd_input pass:[*]_handle_);
	const char pass:[*]*tracecmd_buffer_instance_name*(struct tracecmd_input pass:[*]_handle_, int _indx_);
	struct tracecmd_input pass:[*]*tracecmd_buffer_instance_handle*(struct tracecmd_input pass:[*]_handle_, int _indx_);

Get traceing peer information from a trace file:
	unsigned long long *tracecmd_get_traceid*(struct tracecmd_input pass:[*]_handle_);
	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_);

Control library logs:
	int *tracecmd_set_loglevel*(enum tep_loglevel _level_);
--

DESCRIPTION
-----------
The libtracecmd(3) library provides APIs to read, parse and write
_trace-cmd.dat(5)_ files, recorded with _trace-cmd(1)_ application and containing
tracing information from ftrace, the official Linux kernel tracer.

FILES
-----
[verse]
--
*trace-cmd.h*
	Header file to include in order to have access to the library APIs.
*-ltracecmd*
	Linker switch to add when building a program that uses the library.
--

SEE ALSO
--------
_libtraceevent(3)_
_libtracefs(3)_
_trace-cmd(1)_
_trace-cmd.dat(5)_

AUTHOR
------
[verse]
--
*Steven Rostedt* <rostedt@goodmis.org>
*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>
--
REPORTING BUGS
--------------
Report bugs to  <linux-trace-devel@vger.kernel.org>

LICENSE
-------
libtracecmd is Free Software licensed under the GNU LGPL 2.1

RESOURCES
---------
https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/

COPYING
-------
Copyright \(C) 2020 VMware, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).