Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools lib traceevent: Introduce man pages

Initial support for libtraceevent man pages - Documentation directory,
templates, configurations, Makefiles.

The first man page is also part of the patch - summary of the library
and all its APIs.

Building of the documentation is integrated into the libtraceevent build
process, new targets are added to its Makefile:

make help
make doc
make doc-clean
make doc-install
make doc-uninstall

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lore.kernel.org/linux-trace-devel/20190503091119.23399-2-tstoyanov@vmware.com
Link: http://lkml.kernel.org/r/20190510200106.104812629@goodmis.org
[ Replaced tracefs tracing/events to tracefs events in DESCRIPTION section ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Tzvetomir Stoyanov and committed by
Arnaldo Carvalho de Melo
dc7fd7bf 30ba5b0e

+634
+207
tools/lib/traceevent/Documentation/Makefile
··· 1 + include ../../../scripts/Makefile.include 2 + include ../../../scripts/utilities.mak 3 + 4 + # This Makefile and manpage XSL files were taken from tools/perf/Documentation 5 + # and modified for libtraceevent. 6 + 7 + MAN3_TXT= \ 8 + $(wildcard libtraceevent-*.txt) \ 9 + libtraceevent.txt 10 + 11 + MAN_TXT = $(MAN3_TXT) 12 + _MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT)) 13 + _MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT)) 14 + _DOC_MAN3=$(patsubst %.txt,%.3,$(MAN3_TXT)) 15 + 16 + MAN_XML=$(addprefix $(OUTPUT),$(_MAN_XML)) 17 + MAN_HTML=$(addprefix $(OUTPUT),$(_MAN_HTML)) 18 + DOC_MAN3=$(addprefix $(OUTPUT),$(_DOC_MAN3)) 19 + 20 + # Make the path relative to DESTDIR, not prefix 21 + ifndef DESTDIR 22 + prefix?=$(HOME) 23 + endif 24 + bindir?=$(prefix)/bin 25 + htmldir?=$(prefix)/share/doc/libtraceevent-doc 26 + pdfdir?=$(prefix)/share/doc/libtraceevent-doc 27 + mandir?=$(prefix)/share/man 28 + man3dir=$(mandir)/man3 29 + 30 + ASCIIDOC=asciidoc 31 + ASCIIDOC_EXTRA = --unsafe -f asciidoc.conf 32 + ASCIIDOC_HTML = xhtml11 33 + MANPAGE_XSL = manpage-normal.xsl 34 + XMLTO_EXTRA = 35 + INSTALL?=install 36 + RM ?= rm -f 37 + 38 + ifdef USE_ASCIIDOCTOR 39 + ASCIIDOC = asciidoctor 40 + ASCIIDOC_EXTRA = -a compat-mode 41 + ASCIIDOC_EXTRA += -I. -rasciidoctor-extensions 42 + ASCIIDOC_EXTRA += -a mansource="libtraceevent" -a manmanual="libtraceevent Manual" 43 + ASCIIDOC_HTML = xhtml5 44 + endif 45 + 46 + XMLTO=xmlto 47 + 48 + _tmp_tool_path := $(call get-executable,$(ASCIIDOC)) 49 + ifeq ($(_tmp_tool_path),) 50 + missing_tools = $(ASCIIDOC) 51 + endif 52 + 53 + ifndef USE_ASCIIDOCTOR 54 + _tmp_tool_path := $(call get-executable,$(XMLTO)) 55 + ifeq ($(_tmp_tool_path),) 56 + missing_tools += $(XMLTO) 57 + endif 58 + endif 59 + 60 + # 61 + # For asciidoc ... 62 + # -7.1.2, no extra settings are needed. 63 + # 8.0-, set ASCIIDOC8. 64 + # 65 + 66 + # 67 + # For docbook-xsl ... 68 + # -1.68.1, set ASCIIDOC_NO_ROFF? (based on changelog from 1.73.0) 69 + # 1.69.0, no extra settings are needed? 70 + # 1.69.1-1.71.0, set DOCBOOK_SUPPRESS_SP? 71 + # 1.71.1, no extra settings are needed? 72 + # 1.72.0, set DOCBOOK_XSL_172. 73 + # 1.73.0-, set ASCIIDOC_NO_ROFF 74 + # 75 + 76 + # 77 + # If you had been using DOCBOOK_XSL_172 in an attempt to get rid 78 + # of 'the ".ft C" problem' in your generated manpages, and you 79 + # instead ended up with weird characters around callouts, try 80 + # using ASCIIDOC_NO_ROFF instead (it works fine with ASCIIDOC8). 81 + # 82 + 83 + ifdef ASCIIDOC8 84 + ASCIIDOC_EXTRA += -a asciidoc7compatible 85 + endif 86 + ifdef DOCBOOK_XSL_172 87 + ASCIIDOC_EXTRA += -a libtraceevent-asciidoc-no-roff 88 + MANPAGE_XSL = manpage-1.72.xsl 89 + else 90 + ifdef ASCIIDOC_NO_ROFF 91 + # docbook-xsl after 1.72 needs the regular XSL, but will not 92 + # pass-thru raw roff codes from asciidoc.conf, so turn them off. 93 + ASCIIDOC_EXTRA += -a libtraceevent-asciidoc-no-roff 94 + endif 95 + endif 96 + ifdef MAN_BOLD_LITERAL 97 + XMLTO_EXTRA += -m manpage-bold-literal.xsl 98 + endif 99 + ifdef DOCBOOK_SUPPRESS_SP 100 + XMLTO_EXTRA += -m manpage-suppress-sp.xsl 101 + endif 102 + 103 + SHELL_PATH ?= $(SHELL) 104 + # Shell quote; 105 + SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) 106 + 107 + DESTDIR ?= 108 + DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))' 109 + 110 + export DESTDIR DESTDIR_SQ 111 + 112 + # 113 + # Please note that there is a minor bug in asciidoc. 114 + # The version after 6.0.3 _will_ include the patch found here: 115 + # http://marc.theaimsgroup.com/?l=libtraceevent&m=111558757202243&w=2 116 + # 117 + # Until that version is released you may have to apply the patch 118 + # yourself - yes, all 6 characters of it! 119 + # 120 + QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir 121 + QUIET_SUBDIR1 = 122 + 123 + ifneq ($(findstring $(MAKEFLAGS),w),w) 124 + PRINT_DIR = --no-print-directory 125 + else # "make -w" 126 + NO_SUBDIR = : 127 + endif 128 + 129 + ifneq ($(findstring $(MAKEFLAGS),s),s) 130 + ifneq ($(V),1) 131 + QUIET_ASCIIDOC = @echo ' ASCIIDOC '$@; 132 + QUIET_XMLTO = @echo ' XMLTO '$@; 133 + QUIET_SUBDIR0 = +@subdir= 134 + QUIET_SUBDIR1 = ;$(NO_SUBDIR) \ 135 + echo ' SUBDIR ' $$subdir; \ 136 + $(MAKE) $(PRINT_DIR) -C $$subdir 137 + export V 138 + endif 139 + endif 140 + 141 + all: html man 142 + 143 + man: man3 144 + man3: $(DOC_MAN3) 145 + 146 + html: $(MAN_HTML) 147 + 148 + $(MAN_HTML) $(DOC_MAN3): asciidoc.conf 149 + 150 + install: install-man 151 + 152 + check-man-tools: 153 + ifdef missing_tools 154 + $(error "You need to install $(missing_tools) for man pages") 155 + endif 156 + 157 + do-install-man: man 158 + $(call QUIET_INSTALL, Documentation-man) \ 159 + $(INSTALL) -d -m 755 $(DESTDIR)$(man3dir); \ 160 + $(INSTALL) -m 644 $(DOC_MAN3) $(DESTDIR)$(man3dir); 161 + 162 + install-man: check-man-tools man do-install-man 163 + 164 + uninstall: uninstall-man 165 + 166 + uninstall-man: 167 + $(call QUIET_UNINST, Documentation-man) \ 168 + $(Q)$(RM) $(addprefix $(DESTDIR)$(man3dir)/,$(DOC_MAN3)) 169 + 170 + 171 + ifdef missing_tools 172 + DO_INSTALL_MAN = $(warning Please install $(missing_tools) to have the man pages installed) 173 + else 174 + DO_INSTALL_MAN = do-install-man 175 + endif 176 + 177 + CLEAN_FILES = \ 178 + $(MAN_XML) $(addsuffix +,$(MAN_XML)) \ 179 + $(MAN_HTML) $(addsuffix +,$(MAN_HTML)) \ 180 + $(DOC_MAN3) *.3 181 + 182 + clean: 183 + $(call QUIET_CLEAN, Documentation) $(RM) $(CLEAN_FILES) 184 + 185 + ifdef USE_ASCIIDOCTOR 186 + $(OUTPUT)%.3 : $(OUTPUT)%.txt 187 + $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ 188 + $(ASCIIDOC) -b manpage -d manpage \ 189 + $(ASCIIDOC_EXTRA) -alibtraceevent_version=$(EVENT_PARSE_VERSION) -o $@+ $< && \ 190 + mv $@+ $@ 191 + endif 192 + 193 + $(OUTPUT)%.3 : $(OUTPUT)%.xml 194 + $(QUIET_XMLTO)$(RM) $@ && \ 195 + $(XMLTO) -o $(OUTPUT). -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< 196 + 197 + $(OUTPUT)%.xml : %.txt 198 + $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ 199 + $(ASCIIDOC) -b docbook -d manpage \ 200 + $(ASCIIDOC_EXTRA) -alibtraceevent_version=$(EVENT_PARSE_VERSION) -o $@+ $< && \ 201 + mv $@+ $@ 202 + 203 + $(MAN_HTML): $(OUTPUT)%.html : %.txt 204 + $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ 205 + $(ASCIIDOC) -b $(ASCIIDOC_HTML) -d manpage \ 206 + $(ASCIIDOC_EXTRA) -aperf_version=$(EVENT_PARSE_VERSION) -o $@+ $< && \ 207 + mv $@+ $@
+91
tools/lib/traceevent/Documentation/asciidoc.conf
··· 1 + ## linktep: macro 2 + # 3 + # Usage: linktep:command[manpage-section] 4 + # 5 + # Note, {0} is the manpage section, while {target} is the command. 6 + # 7 + # Show TEP link as: <command>(<section>); if section is defined, else just show 8 + # the command. 9 + 10 + [macros] 11 + (?su)[\\]?(?P<name>linktep):(?P<target>\S*?)\[(?P<attrlist>.*?)\]= 12 + 13 + [attributes] 14 + asterisk=&#42; 15 + plus=&#43; 16 + caret=&#94; 17 + startsb=&#91; 18 + endsb=&#93; 19 + tilde=&#126; 20 + 21 + ifdef::backend-docbook[] 22 + [linktep-inlinemacro] 23 + {0%{target}} 24 + {0#<citerefentry>} 25 + {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>} 26 + {0#</citerefentry>} 27 + endif::backend-docbook[] 28 + 29 + ifdef::backend-docbook[] 30 + ifndef::tep-asciidoc-no-roff[] 31 + # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this. 32 + # v1.72 breaks with this because it replaces dots not in roff requests. 33 + [listingblock] 34 + <example><title>{title}</title> 35 + <literallayout> 36 + ifdef::doctype-manpage[] 37 + &#10;.ft C&#10; 38 + endif::doctype-manpage[] 39 + | 40 + ifdef::doctype-manpage[] 41 + &#10;.ft&#10; 42 + endif::doctype-manpage[] 43 + </literallayout> 44 + {title#}</example> 45 + endif::tep-asciidoc-no-roff[] 46 + 47 + ifdef::tep-asciidoc-no-roff[] 48 + ifdef::doctype-manpage[] 49 + # The following two small workarounds insert a simple paragraph after screen 50 + [listingblock] 51 + <example><title>{title}</title> 52 + <literallayout> 53 + | 54 + </literallayout><simpara></simpara> 55 + {title#}</example> 56 + 57 + [verseblock] 58 + <formalpara{id? id="{id}"}><title>{title}</title><para> 59 + {title%}<literallayout{id? id="{id}"}> 60 + {title#}<literallayout> 61 + | 62 + </literallayout> 63 + {title#}</para></formalpara> 64 + {title%}<simpara></simpara> 65 + endif::doctype-manpage[] 66 + endif::tep-asciidoc-no-roff[] 67 + endif::backend-docbook[] 68 + 69 + ifdef::doctype-manpage[] 70 + ifdef::backend-docbook[] 71 + [header] 72 + template::[header-declarations] 73 + <refentry> 74 + <refmeta> 75 + <refentrytitle>{mantitle}</refentrytitle> 76 + <manvolnum>{manvolnum}</manvolnum> 77 + <refmiscinfo class="source">trace-cmd</refmiscinfo> 78 + <refmiscinfo class="version">{libtraceevent_version}</refmiscinfo> 79 + <refmiscinfo class="manual">trace-cmd Manual</refmiscinfo> 80 + </refmeta> 81 + <refnamediv> 82 + <refname>{manname}</refname> 83 + <refpurpose>{manpurpose}</refpurpose> 84 + </refnamediv> 85 + endif::backend-docbook[] 86 + endif::doctype-manpage[] 87 + 88 + ifdef::backend-xhtml11[] 89 + [linktep-inlinemacro] 90 + <a href="{target}.html">{target}{0?({0})}</a> 91 + endif::backend-xhtml11[]
+203
tools/lib/traceevent/Documentation/libtraceevent.txt
··· 1 + libtraceevent(3) 2 + ================ 3 + 4 + NAME 5 + ---- 6 + libtraceevent - Linux kernel trace event library 7 + 8 + SYNOPSIS 9 + -------- 10 + [verse] 11 + -- 12 + *#include <event-parse.h>* 13 + 14 + Management of tep handler data structure and access of its members: 15 + struct tep_handle pass:[*]*tep_alloc*(void); 16 + void *tep_free*(struct tep_handle pass:[*]_tep_); 17 + void *tep_ref*(struct tep_handle pass:[*]_tep_); 18 + void *tep_unref*(struct tep_handle pass:[*]_tep_); 19 + int *tep_ref_get*(struct tep_handle pass:[*]_tep_); 20 + void *tep_set_flag*(struct tep_handle pass:[*]_tep_, enum tep_flag _flag_); 21 + void *tep_clear_flag*(struct tep_handle pass:[*]_tep_, enum tep_flag _flag_); 22 + bool *tep_test_flag*(struct tep_handle pass:[*]_tep_, enum tep_flag _flags_); 23 + int *tep_get_cpus*(struct tep_handle pass:[*]_tep_); 24 + void *tep_set_cpus*(struct tep_handle pass:[*]_tep_, int _cpus_); 25 + int *tep_get_long_size*(strucqt tep_handle pass:[*]_tep_); 26 + void *tep_set_long_size*(struct tep_handle pass:[*]_tep_, int _long_size_); 27 + int *tep_get_page_size*(struct tep_handle pass:[*]_tep_); 28 + void *tep_set_page_size*(struct tep_handle pass:[*]_tep_, int _page_size_); 29 + bool *tep_is_latency_format*(struct tep_handle pass:[*]_tep_); 30 + void *tep_set_latency_format*(struct tep_handle pass:[*]_tep_, int _lat_); 31 + int *tep_get_header_page_size*(struct tep_handle pass:[*]_tep_); 32 + int *tep_get_header_timestamp_size*(struct tep_handle pass:[*]_tep_); 33 + bool *tep_is_old_format*(struct tep_handle pass:[*]_tep_); 34 + int *tep_strerror*(struct tep_handle pass:[*]_tep_, enum tep_errno _errnum_, char pass:[*]_buf_, size_t _buflen_); 35 + 36 + Register / unregister APIs: 37 + int *tep_register_trace_clock*(struct tep_handle pass:[*]_tep_, const char pass:[*]_trace_clock_); 38 + int *tep_register_function*(struct tep_handle pass:[*]_tep_, char pass:[*]_name_, unsigned long long _addr_, char pass:[*]_mod_); 39 + int *tep_register_event_handler*(struct tep_handle pass:[*]_tep_, int _id_, const char pass:[*]_sys_name_, const char pass:[*]_event_name_, tep_event_handler_func _func_, void pass:[*]_context_); 40 + int *tep_unregister_event_handler*(struct tep_handle pass:[*]tep, int id, const char pass:[*]sys_name, const char pass:[*]event_name, tep_event_handler_func func, void pass:[*]_context_); 41 + int *tep_register_print_string*(struct tep_handle pass:[*]_tep_, const char pass:[*]_fmt_, unsigned long long _addr_); 42 + int *tep_register_print_function*(struct tep_handle pass:[*]_tep_, tep_func_handler _func_, enum tep_func_arg_type _ret_type_, char pass:[*]_name_, _..._); 43 + int *tep_unregister_print_function*(struct tep_handle pass:[*]_tep_, tep_func_handler _func_, char pass:[*]_name_); 44 + 45 + Plugins management: 46 + struct tep_plugin_list pass:[*]*tep_load_plugins*(struct tep_handle pass:[*]_tep_); 47 + void *tep_unload_plugins*(struct tep_plugin_list pass:[*]_plugin_list_, struct tep_handle pass:[*]_tep_); 48 + char pass:[*]pass:[*]*tep_plugin_list_options*(void); 49 + void *tep_plugin_free_options_list*(char pass:[*]pass:[*]_list_); 50 + int *tep_plugin_add_options*(const char pass:[*]_name_, struct tep_plugin_option pass:[*]_options_); 51 + void *tep_plugin_remove_options*(struct tep_plugin_option pass:[*]_options_); 52 + void *tep_print_plugins*(struct trace_seq pass:[*]_s_, const char pass:[*]_prefix_, const char pass:[*]_suffix_, const struct tep_plugin_list pass:[*]_list_); 53 + 54 + Event related APIs: 55 + struct tep_event pass:[*]*tep_get_event*(struct tep_handle pass:[*]_tep_, int _index_); 56 + struct tep_event pass:[*]*tep_get_first_event*(struct tep_handle pass:[*]_tep_); 57 + int *tep_get_events_count*(struct tep_handle pass:[*]_tep_); 58 + struct tep_event pass:[*]pass:[*]*tep_list_events*(struct tep_handle pass:[*]_tep_, enum tep_event_sort_type _sort_type_); 59 + struct tep_event pass:[*]pass:[*]*tep_list_events_copy*(struct tep_handle pass:[*]_tep_, enum tep_event_sort_type _sort_type_); 60 + 61 + Event printing: 62 + void *tep_print_event*(struct tep_handle pass:[*]_tep_, struct trace_seq pass:[*]_s_, struct tep_record pass:[*]_record_, bool _use_trace_clock_); 63 + void *tep_print_event_data*(struct tep_handle pass:[*]_tep_, struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, struct tep_record pass:[*]_record_); 64 + void *tep_event_info*(struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, struct tep_record pass:[*]_record_); 65 + void *tep_print_event_task*(struct tep_handle pass:[*]_tep_, struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, struct tep_record pass:[*]_record_); 66 + void *tep_print_event_time*(struct tep_handle pass:[*]_tep_, struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, struct tep_record pass:[*]record, bool _use_trace_clock_); 67 + void *tep_set_print_raw*(struct tep_handle pass:[*]_tep_, int _print_raw_); 68 + 69 + Event finding: 70 + struct tep_event pass:[*]*tep_find_event*(struct tep_handle pass:[*]_tep_, int _id_); 71 + struct tep_event pass:[*]*tep_find_event_by_name*(struct tep_handle pass:[*]_tep_, const char pass:[*]_sys_, const char pass:[*]_name_); 72 + struct tep_event pass:[*]*tep_find_event_by_record*(struct tep_handle pass:[*]_tep_, struct tep_record pass:[*]_record_); 73 + 74 + Parsing of event files: 75 + int *tep_parse_header_page*(struct tep_handle pass:[*]_tep_, char pass:[*]_buf_, unsigned long _size_, int _long_size_); 76 + enum tep_errno *tep_parse_event*(struct tep_handle pass:[*]_tep_, const char pass:[*]_buf_, unsigned long _size_, const char pass:[*]_sys_); 77 + enum tep_errno *tep_parse_format*(struct tep_handle pass:[*]_tep_, struct tep_event pass:[*]pass:[*]_eventp_, const char pass:[*]_buf_, unsigned long _size_, const char pass:[*]_sys_); 78 + 79 + APIs related to fields from event's format files: 80 + struct tep_format_field pass:[*]pass:[*]*tep_event_common_fields*(struct tep_event pass:[*]_event_); 81 + struct tep_format_field pass:[*]pass:[*]*tep_event_fields*(struct tep_event pass:[*]_event_); 82 + void pass:[*]*tep_get_field_raw*(struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, const char pass:[*]_name_, struct tep_record pass:[*]_record_, int pass:[*]_len_, int _err_); 83 + int *tep_get_field_val*(struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, const char pass:[*]_name_, struct tep_record pass:[*]_record_, unsigned long long pass:[*]_val_, int _err_); 84 + int *tep_get_common_field_val*(struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, const char pass:[*]_name_, struct tep_record pass:[*]_record_, unsigned long long pass:[*]_val_, int _err_); 85 + int *tep_get_any_field_val*(struct trace_seq pass:[*]_s_, struct tep_event pass:[*]_event_, const char pass:[*]_name_, struct tep_record pass:[*]_record_, unsigned long long pass:[*]_val_, int _err_); 86 + int *tep_read_number_field*(struct tep_format_field pass:[*]_field_, const void pass:[*]_data_, unsigned long long pass:[*]_value_); 87 + 88 + Event fields printing: 89 + void *tep_print_field*(struct trace_seq pass:[*]_s_, void pass:[*]_data_, struct tep_format_field pass:[*]_field_); 90 + void *tep_print_fields*(struct trace_seq pass:[*]_s_, void pass:[*]_data_, int _size_, struct tep_event pass:[*]_event_); 91 + int *tep_print_num_field*(struct trace_seq pass:[*]_s_, const char pass:[*]_fmt_, struct tep_event pass:[*]_event_, const char pass:[*]_name_, struct tep_record pass:[*]_record_, int _err_); 92 + int *tep_print_func_field*(struct trace_seq pass:[*]_s_, const char pass:[*]_fmt_, struct tep_event pass:[*]_event_, const char pass:[*]_name_, struct tep_record pass:[*]_record_, int _err_); 93 + 94 + Event fields finding: 95 + struct tep_format_field pass:[*]*tep_find_common_field*(struct tep_event pass:[*]_event_, const char pass:[*]_name_); 96 + struct tep_format_field pass:[*]*tep_find_field*(struct tep_event_ormat pass:[*]_event_, const char pass:[*]_name_); 97 + struct tep_format_field pass:[*]*tep_find_any_field*(struct tep_event pass:[*]_event_, const char pass:[*]_name_); 98 + 99 + Functions resolver: 100 + int *tep_set_function_resolver*(struct tep_handle pass:[*]_tep_, tep_func_resolver_t pass:[*]_func_, void pass:[*]_priv_); 101 + void *tep_reset_function_resolver*(struct tep_handle pass:[*]_tep_); 102 + const char pass:[*]*tep_find_function*(struct tep_handle pass:[*]_tep_, unsigned long long _addr_); 103 + unsigned long long *tep_find_function_address*(struct tep_handle pass:[*]_tep_, unsigned long long _addr_); 104 + 105 + Filter management: 106 + struct tep_event_filter pass:[*]*tep_filter_alloc*(struct tep_handle pass:[*]_tep_); 107 + enum tep_errno *tep_filter_add_filter_str*(struct tep_event_filter pass:[*]_filter_, const char pass:[*]_filter_str_); 108 + enum tep_errno *tep_filter_match*(struct tep_event_filter pass:[*]_filter_, struct tep_record pass:[*]_record_); 109 + int *tep_filter_strerror*(struct tep_event_filter pass:[*]_filter_, enum tep_errno _err_, char pass:[*]buf, size_t _buflen_); 110 + int *tep_event_filtered*(struct tep_event_filter pass:[*]_filter_, int _event_id_); 111 + void *tep_filter_reset*(struct tep_event_filter pass:[*]_filter_); 112 + void *tep_filter_free*(struct tep_event_filter pass:[*]_filter_); 113 + char pass:[*]*tep_filter_make_string*(struct tep_event_filter pass:[*]_filter_, int _event_id_); 114 + int *tep_filter_remove_event*(struct tep_event_filter pass:[*]_filter_, int _event_id_); 115 + int *tep_filter_copy*(struct tep_event_filter pass:[*]_dest_, struct tep_event_filter pass:[*]_source_); 116 + int *tep_filter_compare*(struct tep_event_filter pass:[*]_filter1_, struct tep_event_filter pass:[*]_filter2_); 117 + 118 + Parsing various data from the records: 119 + void *tep_data_latency_format*(struct tep_handle pass:[*]_tep_, struct trace_seq pass:[*]_s_, struct tep_record pass:[*]_record_); 120 + int *tep_data_type*(struct tep_handle pass:[*]_tep_, struct tep_record pass:[*]_rec_); 121 + int *tep_data_pid*(struct tep_handle pass:[*]_tep_, struct tep_record pass:[*]_rec_); 122 + int *tep_data_preempt_count*(struct tep_handle pass:[*]_tep_, struct tep_record pass:[*]_rec_); 123 + int *tep_data_flags*(struct tep_handle pass:[*]_tep_, struct tep_record pass:[*]_rec_); 124 + 125 + Command and task related APIs: 126 + const char pass:[*]*tep_data_comm_from_pid*(struct tep_handle pass:[*]_tep_, int _pid_); 127 + struct cmdline pass:[*]*tep_data_pid_from_comm*(struct tep_handle pass:[*]_tep_, const char pass:[*]_comm_, struct cmdline pass:[*]_next_); 128 + int *tep_register_comm*(struct tep_handle pass:[*]_tep_, const char pass:[*]_comm_, int _pid_); 129 + int *tep_override_comm*(struct tep_handle pass:[*]_tep_, const char pass:[*]_comm_, int _pid_); 130 + bool *tep_is_pid_registered*(struct tep_handle pass:[*]_tep_, int _pid_); 131 + int *tep_cmdline_pid*(struct tep_handle pass:[*]_tep_, struct cmdline pass:[*]_cmdline_); 132 + 133 + Endian related APIs: 134 + int *tep_is_bigendian*(void); 135 + unsigned long long *tep_read_number*(struct tep_handle pass:[*]_tep_, const void pass:[*]_ptr_, int _size_); 136 + bool *tep_is_file_bigendian*(struct tep_handle pass:[*]_tep_); 137 + void *tep_set_file_bigendian*(struct tep_handle pass:[*]_tep_, enum tep_endian _endian_); 138 + bool *tep_is_local_bigendian*(struct tep_handle pass:[*]_tep_); 139 + void *tep_set_local_bigendian*(struct tep_handle pass:[*]_tep_, enum tep_endian _endian_); 140 + 141 + Trace sequences: 142 + *#include <trace-seq.h>* 143 + void *trace_seq_init*(struct trace_seq pass:[*]_s_); 144 + void *trace_seq_reset*(struct trace_seq pass:[*]_s_); 145 + void *trace_seq_destroy*(struct trace_seq pass:[*]_s_); 146 + int *trace_seq_printf*(struct trace_seq pass:[*]_s_, const char pass:[*]_fmt_, ...); 147 + int *trace_seq_vprintf*(struct trace_seq pass:[*]_s_, const char pass:[*]_fmt_, va_list _args_); 148 + int *trace_seq_puts*(struct trace_seq pass:[*]_s_, const char pass:[*]_str_); 149 + int *trace_seq_putc*(struct trace_seq pass:[*]_s_, unsigned char _c_); 150 + void *trace_seq_terminate*(struct trace_seq pass:[*]_s_); 151 + int *trace_seq_do_fprintf*(struct trace_seq pass:[*]_s_, FILE pass:[*]_fp_); 152 + int *trace_seq_do_printf*(struct trace_seq pass:[*]_s_); 153 + -- 154 + 155 + DESCRIPTION 156 + ----------- 157 + The libtraceevent(3) library provides APIs to access kernel tracepoint events, 158 + located in the tracefs file system under the events directory. 159 + 160 + ENVIRONMENT 161 + ----------- 162 + [verse] 163 + -- 164 + TRACEEVENT_PLUGIN_DIR 165 + Additional plugin directory. All shared object files, located in this directory will be loaded as traceevent plugins. 166 + -- 167 + 168 + FILES 169 + ----- 170 + [verse] 171 + -- 172 + *event-parse.h* 173 + Header file to include in order to have access to the library APIs. 174 + *trace-seq.h* 175 + Header file to include in order to have access to trace sequences related APIs. 176 + Trace sequences are used to allow a function to call several other functions 177 + to create a string of data to use. 178 + *-ltraceevent* 179 + Linker switch to add when building a program that uses the library. 180 + -- 181 + 182 + SEE ALSO 183 + -------- 184 + _trace-cmd(1)_ 185 + 186 + AUTHOR 187 + ------ 188 + [verse] 189 + -- 190 + *Steven Rostedt* <rostedt@goodmis.org>, author of *libtraceevent*. 191 + *Tzvetomir Stoyanov* <tz.stoyanov@gmail.com>, author of this man page. 192 + -- 193 + REPORTING BUGS 194 + -------------- 195 + Report bugs to <linux-trace-devel@vger.kernel.org> 196 + 197 + LICENSE 198 + ------- 199 + libtraceevent is Free Software licensed under the GNU LGPL 2.1 200 + 201 + RESOURCES 202 + --------- 203 + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
+14
tools/lib/traceevent/Documentation/manpage-1.72.xsl
··· 1 + <!-- manpage-1.72.xsl: 2 + special settings for manpages rendered from asciidoc+docbook 3 + handles peculiarities in docbook-xsl 1.72.0 --> 4 + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 5 + version="1.0"> 6 + 7 + <xsl:import href="manpage-base.xsl"/> 8 + 9 + <!-- these are the special values for the roff control characters 10 + needed for docbook-xsl 1.72.0 --> 11 + <xsl:param name="git.docbook.backslash">&#x2593;</xsl:param> 12 + <xsl:param name="git.docbook.dot" >&#x2302;</xsl:param> 13 + 14 + </xsl:stylesheet>
+35
tools/lib/traceevent/Documentation/manpage-base.xsl
··· 1 + <!-- manpage-base.xsl: 2 + special formatting for manpages rendered from asciidoc+docbook --> 3 + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 + version="1.0"> 5 + 6 + <!-- these params silence some output from xmlto --> 7 + <xsl:param name="man.output.quietly" select="1"/> 8 + <xsl:param name="refentry.meta.get.quietly" select="1"/> 9 + 10 + <!-- convert asciidoc callouts to man page format; 11 + git.docbook.backslash and git.docbook.dot params 12 + must be supplied by another XSL file or other means --> 13 + <xsl:template match="co"> 14 + <xsl:value-of select="concat( 15 + $git.docbook.backslash,'fB(', 16 + substring-after(@id,'-'),')', 17 + $git.docbook.backslash,'fR')"/> 18 + </xsl:template> 19 + <xsl:template match="calloutlist"> 20 + <xsl:value-of select="$git.docbook.dot"/> 21 + <xsl:text>sp&#10;</xsl:text> 22 + <xsl:apply-templates/> 23 + <xsl:text>&#10;</xsl:text> 24 + </xsl:template> 25 + <xsl:template match="callout"> 26 + <xsl:value-of select="concat( 27 + $git.docbook.backslash,'fB', 28 + substring-after(@arearefs,'-'), 29 + '. ',$git.docbook.backslash,'fR')"/> 30 + <xsl:apply-templates/> 31 + <xsl:value-of select="$git.docbook.dot"/> 32 + <xsl:text>br&#10;</xsl:text> 33 + </xsl:template> 34 + 35 + </xsl:stylesheet>
+17
tools/lib/traceevent/Documentation/manpage-bold-literal.xsl
··· 1 + <!-- manpage-bold-literal.xsl: 2 + special formatting for manpages rendered from asciidoc+docbook --> 3 + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 + version="1.0"> 5 + 6 + <!-- render literal text as bold (instead of plain or monospace); 7 + this makes literal text easier to distinguish in manpages 8 + viewed on a tty --> 9 + <xsl:template match="literal"> 10 + <xsl:value-of select="$git.docbook.backslash"/> 11 + <xsl:text>fB</xsl:text> 12 + <xsl:apply-templates/> 13 + <xsl:value-of select="$git.docbook.backslash"/> 14 + <xsl:text>fR</xsl:text> 15 + </xsl:template> 16 + 17 + </xsl:stylesheet>
+13
tools/lib/traceevent/Documentation/manpage-normal.xsl
··· 1 + <!-- manpage-normal.xsl: 2 + special settings for manpages rendered from asciidoc+docbook 3 + handles anything we want to keep away from docbook-xsl 1.72.0 --> 4 + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 5 + version="1.0"> 6 + 7 + <xsl:import href="manpage-base.xsl"/> 8 + 9 + <!-- these are the normal values for the roff control characters --> 10 + <xsl:param name="git.docbook.backslash">\</xsl:param> 11 + <xsl:param name="git.docbook.dot" >.</xsl:param> 12 + 13 + </xsl:stylesheet>
+21
tools/lib/traceevent/Documentation/manpage-suppress-sp.xsl
··· 1 + <!-- manpage-suppress-sp.xsl: 2 + special settings for manpages rendered from asciidoc+docbook 3 + handles erroneous, inline .sp in manpage output of some 4 + versions of docbook-xsl --> 5 + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 6 + version="1.0"> 7 + 8 + <!-- attempt to work around spurious .sp at the tail of the line 9 + that some versions of docbook stylesheets seem to add --> 10 + <xsl:template match="simpara"> 11 + <xsl:variable name="content"> 12 + <xsl:apply-templates/> 13 + </xsl:variable> 14 + <xsl:value-of select="normalize-space($content)"/> 15 + <xsl:if test="not(ancestor::authorblurb) and 16 + not(ancestor::personblurb)"> 17 + <xsl:text>&#10;&#10;</xsl:text> 18 + </xsl:if> 19 + </xsl:template> 20 + 21 + </xsl:stylesheet>
+33
tools/lib/traceevent/Makefile
··· 56 56 57 57 export man_dir man_dir_SQ INSTALL 58 58 export DESTDIR DESTDIR_SQ 59 + export EVENT_PARSE_VERSION 59 60 60 61 set_plugin_dir := 1 61 62 ··· 319 318 $(RM) TRACEEVENT-CFLAGS tags TAGS; \ 320 319 $(RM) $(PKG_CONFIG_FILE) 321 320 321 + PHONY += doc 322 + doc: 323 + $(call descend,Documentation) 324 + 325 + PHONY += doc-clean 326 + doc-clean: 327 + $(call descend,Documentation,clean) 328 + 329 + PHONY += doc-install 330 + doc-install: 331 + $(call descend,Documentation,install) 332 + 333 + PHONY += doc-uninstall 334 + doc-uninstall: 335 + $(call descend,Documentation,uninstall) 336 + 337 + PHONY += help 338 + help: 339 + @echo 'Possible targets:' 340 + @echo'' 341 + @echo ' all - default, compile the library and the'\ 342 + 'plugins' 343 + @echo ' plugins - compile the plugins' 344 + @echo ' install - install the library, the plugins,'\ 345 + 'the header and pkgconfig files' 346 + @echo ' clean - clean the library and the plugins object files' 347 + @echo ' doc - compile the documentation files - man'\ 348 + 'and html pages, in the Documentation directory' 349 + @echo ' doc-clean - clean the documentation files' 350 + @echo ' doc-install - install the man pages' 351 + @echo ' doc-uninstall - uninstall the man pages' 352 + @echo'' 322 353 PHONY += force plugins 323 354 force: 324 355