/openbmc/linux/tools/perf/ |
H A D | builtin-ftrace.c | 3 * builtin-ftrace.c 33 #include "util/ftrace.h" 223 static void reset_tracing_options(struct perf_ftrace *ftrace __maybe_unused) in reset_tracing_options() 235 static int reset_tracing_files(struct perf_ftrace *ftrace __maybe_unused) in reset_tracing_files() 256 reset_tracing_options(ftrace); in reset_tracing_files() 260 static int set_tracing_pid(struct perf_ftrace *ftrace) in set_tracing_pid() argument 265 if (target__has_cpu(&ftrace->target)) in set_tracing_pid() 268 for (i = 0; i < perf_thread_map__nr(ftrace->evlist->core.threads); i++) { in set_tracing_pid() 270 perf_thread_map__pid(ftrace->evlist->core.threads, i)); in set_tracing_pid() 302 static int set_tracing_cpu(struct perf_ftrace *ftrace) in set_tracing_cpu() argument [all …]
|
/openbmc/linux/Documentation/trace/ |
H A D | boottime-trace.rst | 13 device initialization with full features of ftrace including per-event 23 boot config file [1]_. All options are under "ftrace." or "kernel." 30 Ftrace Global Options 33 Ftrace global options have "kernel." prefix in boot config, which means 40 Dump ftrace on Oops. If MODE = 1 or omitted, dump trace buffer 56 Ftrace Per-instance Options 59 These options can be used for each instance including global ftrace node. 61 ftrace.[instance.INSTANCE.]options = OPT1[, OPT2[...]] 62 Enable given ftrace options. 64 ftrace.[instance.INSTANCE.]tracing_on = 0|1 [all …]
|
H A D | fprobe.rst | 12 Fprobe is a function entry/exit probe mechanism based on ftrace. 13 Instead of using ftrace full feature, if you only want to attach callbacks 22 The fprobe is a wrapper of ftrace (+ kretprobe-like return callback) to 45 The register_fprobe_ips() enables a fprobe by ftrace-location addresses. 79 Same as ftrace, the registered callbacks will start being called some time 81 :file:`Documentation/trace/ftrace.rst`. 107 This is the ftrace address of the traced function (both entry and exit). 109 the address where the ftrace is instrumented. 131 Since the recursion safeness of the fprobe (and ftrace) is a bit different 166 which is traced by other ftrace users is called from the entry_handler. [all …]
|
H A D | ftrace-uses.rst | 2 Using ftrace to hook to functions 15 The ftrace infrastructure was originally created to attach callbacks to the 19 how to use ftrace to implement your own function callbacks. 22 The ftrace context 41 is used to tell ftrace what function should be called as the callback 43 ftrace to handle. 46 an ftrace_ops with ftrace: 68 #include <linux/ftrace.h> 108 at the start of the function where ftrace was tracing. Otherwise it 164 The ftrace FLAGS [all …]
|
/openbmc/linux/tools/testing/selftests/ftrace/test.d/direct/ |
H A D | ftrace-direct.tc | 3 # description: Test ftrace direct functions against tracers 5 rmmod ftrace-direct ||: 6 if ! modprobe ftrace-direct ; then 7 echo "No ftrace-direct sample module - please make CONFIG_SAMPLE_FTRACE_DIRECT=m" 16 rmmod ftrace-direct 23 modprobe ftrace-direct 24 rmmod ftrace-direct 29 modprobe ftrace-direct 31 rmmod ftrace-direct 34 modprobe ftrace-direct [all …]
|
H A D | kprobe-direct.tc | 3 # description: Test ftrace direct functions against kprobes 6 rmmod ftrace-direct ||: 7 if ! modprobe ftrace-direct ; then 8 echo "No ftrace-direct sample module - please build with CONFIG_SAMPLE_FTRACE_DIRECT=m" 17 rmmod ftrace-direct 23 modprobe ftrace-direct 29 rmmod ftrace-direct 72 echo "Running with another ftrace direct function" 74 modprobe ftrace-direct-too 78 rmmod ftrace-direct-too
|
/openbmc/linux/tools/perf/util/ |
H A D | bpf_ftrace.c | 8 #include "util/ftrace.h" 19 int perf_ftrace__latency_prepare_bpf(struct perf_ftrace *ftrace) in perf_ftrace__latency_prepare_bpf() argument 25 if (!list_is_singular(&ftrace->filters)) { in perf_ftrace__latency_prepare_bpf() 27 list_empty(&ftrace->filters) ? "No" : "Too many"); in perf_ftrace__latency_prepare_bpf() 31 func = list_first_entry(&ftrace->filters, struct filter_entry, list); in perf_ftrace__latency_prepare_bpf() 40 if (ftrace->target.cpu_list) { in perf_ftrace__latency_prepare_bpf() 41 ncpus = perf_cpu_map__nr(ftrace->evlist->core.user_requested_cpus); in perf_ftrace__latency_prepare_bpf() 45 if (target__has_task(&ftrace->target) || target__none(&ftrace->target)) { in perf_ftrace__latency_prepare_bpf() 46 ntasks = perf_thread_map__nr(ftrace->evlist->core.threads); in perf_ftrace__latency_prepare_bpf() 58 if (ftrace->target.cpu_list) { in perf_ftrace__latency_prepare_bpf() [all …]
|
H A D | ftrace.h | 39 int perf_ftrace__latency_prepare_bpf(struct perf_ftrace *ftrace); 40 int perf_ftrace__latency_start_bpf(struct perf_ftrace *ftrace); 41 int perf_ftrace__latency_stop_bpf(struct perf_ftrace *ftrace); 42 int perf_ftrace__latency_read_bpf(struct perf_ftrace *ftrace, 44 int perf_ftrace__latency_cleanup_bpf(struct perf_ftrace *ftrace); 49 perf_ftrace__latency_prepare_bpf(struct perf_ftrace *ftrace __maybe_unused) in perf_ftrace__latency_prepare_bpf() 55 perf_ftrace__latency_start_bpf(struct perf_ftrace *ftrace __maybe_unused) in perf_ftrace__latency_start_bpf() 61 perf_ftrace__latency_stop_bpf(struct perf_ftrace *ftrace __maybe_unused) in perf_ftrace__latency_stop_bpf() 67 perf_ftrace__latency_read_bpf(struct perf_ftrace *ftrace __maybe_unused, in perf_ftrace__latency_read_bpf() 74 perf_ftrace__latency_cleanup_bpf(struct perf_ftrace *ftrace __maybe_unused) in perf_ftrace__latency_cleanup_bpf()
|
/openbmc/linux/drivers/hwtracing/stm/ |
H A D | ftrace.c | 3 * Simple kernel driver to link kernel Ftrace and an STM device 6 * STM Ftrace will be registered as a trace_export. 21 struct trace_export ftrace; member 24 .name = "ftrace", 39 struct stm_ftrace *stm = container_of(export, struct stm_ftrace, ftrace); in stm_ftrace_write() 50 sf->ftrace.write = stm_ftrace_write; in stm_ftrace_link() 51 sf->ftrace.flags = TRACE_EXPORT_FUNCTION | TRACE_EXPORT_EVENT in stm_ftrace_link() 54 return register_ftrace_export(&sf->ftrace); in stm_ftrace_link() 61 unregister_ftrace_export(&sf->ftrace); in stm_ftrace_unlink() 71 pr_err("Failed to register stm_source - ftrace.\n"); in stm_ftrace_init()
|
/openbmc/linux/tools/perf/Documentation/ |
H A D | perf-ftrace.txt | 1 perf-ftrace(1) 6 perf-ftrace - simple wrapper for kernel's ftrace functionality 12 'perf ftrace' {trace|latency} <command> 16 The 'perf ftrace' command provides a collection of subcommands which use 17 kernel's ftrace infrastructure. 19 'perf ftrace trace' is a simple wrapper of the ftrace. It only supports 23 'perf ftrace latency' calculates execution latency of a given function 26 The following options apply to perf ftrace. 57 OPTIONS for 'perf ftrace trace' 130 OPTIONS for 'perf ftrace latency' [all …]
|
/openbmc/linux/tools/power/pm-graph/ |
H A D | bootgraph.8 | 21 The tool can also augment the timeline with ftrace data on custom target 27 raw ftrace file : <hostname>_boot_ftrace.txt 51 Use ftrace to create initcall callgraphs (default: disabled). If -func 56 Use ftrace to add function detail (default: disabled) 108 \fB-ftrace \fIfile\fR 109 Create HTML output from an existing ftrace file (used with -dmesg). 113 Print all ftrace functions capable of being captured. These are all the 124 Create a timeline using the current dmesg and ftrace log. 162 \f(CW$ bootgraph -dmesg dmesg.txt -ftrace ftrace.txt -callgraph\fR 166 \f(CW$ bootgraph -dmesg dmesg.txt -ftrace ftrace.txt -addlogs\fR
|
H A D | sleepgraph.8 | 13 suspend and capture dmesg and ftrace data until resume is complete. 24 raw ftrace file : <hostname>_<mode>_ftrace.txt 53 Add the dmesg and ftrace logs to the html output. They will be viewable by 141 You can generate the html timelines later with \fI-dmesg\fR & \fI-ftrace\fR, or 144 .SS "ftrace debug" 147 Use ftrace to create device callgraphs (default: disabled). This can produce 151 Use ftrace on the top level call: "suspend_devices_and_enter" only (default: disabled). 209 dmesg and ftrace logs. This will require a significant amount of time if there 242 Print the list of ftrace functions currently being captured. Functions 249 Print all ftrace functions capable of being captured. These are all the [all …]
|
/openbmc/linux/samples/ftrace/ |
H A D | Makefile | 3 obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct.o 4 obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct-too.o 5 obj-$(CONFIG_SAMPLE_FTRACE_DIRECT) += ftrace-direct-modify.o 6 obj-$(CONFIG_SAMPLE_FTRACE_DIRECT_MULTI) += ftrace-direct-multi.o 7 obj-$(CONFIG_SAMPLE_FTRACE_DIRECT_MULTI) += ftrace-direct-multi-modify.o 8 obj-$(CONFIG_SAMPLE_FTRACE_OPS) += ftrace-ops.o
|
/openbmc/linux/tools/testing/ktest/examples/bootconfigs/ |
H A D | boottrace.bconf | 1 ftrace.event { 33 ftrace.instance { 36 ftrace.filters = "user_*" 45 ftrace.filters = "kernel_*" 51 ftrace.alloc_snapshot 57 ftrace = function
|
/openbmc/linux/tools/testing/selftests/ftrace/test.d/trigger/ |
H A D | trigger-trace-marker-synthetic.tc | 4 # requires: set_event synthetic_events events/ftrace/print/trigger events/ftrace/print/hist 15 echo 'hist:keys=common_pid:ts0=common_timestamp.usecs if buf == "start"' > events/ftrace/print/trig… 16 …n_pid:lat=common_timestamp.usecs-$ts0:onmatch(ftrace.print).latency($lat) if buf == "end"' >> even… 21 cnt=`grep 'hitcount: *1$' events/ftrace/print/hist | wc -l`
|
H A D | trigger-trace-marker-hist.tc | 4 # requires: set_event events/ftrace/print/trigger events/ftrace/print/hist 14 echo 'hist:keys=common_pid' > events/ftrace/print/trigger 16 grep 'hitcount: *10$' events/ftrace/print/hist > /dev/null || \
|
H A D | trigger-trace-marker-synthetic-kernel.tc | 4 …et_event synthetic_events events/sched/sched_waking events/ftrace/print/trigger events/ftrace/prin… 16 …ommon_timestamp.usecs-$ts0:onmatch(sched.sched_waking).latency($lat)' > events/ftrace/print/trigger 21 grep 'hitcount: *1$' events/ftrace/print/hist > /dev/null || \
|
/openbmc/linux/tools/bootconfig/scripts/ |
H A D | bconf2ftrace.sh | 5 echo "Ftrace boottime trace test tool" 8 echo " --init: Initialize ftrace before applying (imply --apply)" 60 echo "Error: ftrace is not enabled on this kernel." 1>&2 66 . `dirname $0`/ftrace.sh 217 setup_events() { # prefix("ftrace" or "ftrace.instance.INSTANCE") [instance] 246 instance="ftrace.instance.${1}" 249 instance="ftrace" 258 set_array_of ${instance}.ftrace.filters \ 260 set_array_of ${instance}.ftrace.notrace \ 277 # ftrace global configs (kernel.*) [all …]
|
/openbmc/linux/kernel/trace/ |
H A D | Kconfig | 27 See Documentation/trace/ftrace-design.rst 32 See Documentation/trace/ftrace-design.rst 40 See Documentation/trace/ftrace-design.rst 64 but does not want them included in the ftrace locations. 69 See Documentation/trace/ftrace-design.rst 74 See Documentation/trace/ftrace-design.rst 96 of ftrace locations. 182 menuconfig FTRACE config 189 if FTRACE 196 Enable developer to setup ftrace subsystem via supplemental [all …]
|
H A D | fprobe.c | 3 * fprobe - Simple ftrace probe wrapper for function entry. 158 /* Convert ftrace location address from symbols */ 236 * register_fprobe() - Register fprobe to ftrace by pattern. 241 * Register @fp to ftrace for enabling the probe on the symbols matched to @filter. 293 * register_fprobe_ips() - Register fprobe to ftrace by address. 295 * @addrs: An array of target ftrace location addresses. 298 * Register @fp to ftrace for enabling the probe on the address given by @addrs. 299 * The @addrs must be the addresses of ftrace location address, which may be 329 * register_fprobe_syms() - Register fprobe to ftrace by symbols. 368 * unregister_fprobe() - Unregister fprobe from ftrace [all …]
|
H A D | trace_kdb.c | 3 * kdb helper for dumping the ftrace buffer 15 #include <linux/ftrace.h> 36 kdb_printf("Dumping ftrace buffer:\n"); in ftrace_dump_buf() 77 kdb_printf(" (ftrace buffer empty)\n"); in ftrace_dump_buf() 93 * kdb_ftdump - Dump the ftrace log buffer 154 .help = "Dump ftrace log; -skip dumps last #entries",
|
/openbmc/linux/tools/testing/selftests/ftrace/test.d/kprobe/ |
H A D | kprobe_ftrace.tc | 11 # kprobe on / ftrace off 18 # kprobe on / ftrace on 25 # kprobe off / ftrace on 32 # kprobe on / ftrace on 40 # kprobe on / ftrace off
|
/openbmc/u-boot/lib/ |
H A D | trace.c | 31 struct trace_call *ftrace; /* The function call records */ member 32 ulong ftrace_size; /* Num. of ftrace records we have space for */ 33 ulong ftrace_count; /* Num. of ftrace records written */ 67 struct trace_call *rec = &hdr->ftrace[hdr->ftrace_count]; in add_ftrace() 79 struct trace_call *rec = &hdr->ftrace[hdr->ftrace_count]; in add_textbase() 210 struct trace_call *call = &hdr->ftrace[rec]; in trace_list_calls() 239 #ifndef FTRACE in trace_print_stats() 240 puts("Warning: make U-Boot with FTRACE to enable function instrumenting.\n"); in trace_print_stats() 297 end = (char *)&hdr->ftrace[hdr->ftrace_count]; in trace_init() 322 hdr->ftrace = (struct trace_call *)(buff + needed); in trace_init() [all …]
|
/openbmc/linux/Documentation/livepatch/ |
H A D | livepatch.rst | 23 2. Kprobes, Ftrace, Livepatching 43 Most of these problems are solved by using the dynamic ftrace framework as 44 a base. A Kprobe is registered as a ftrace handler when the function entry 46 a live patch is called with the help of a custom ftrace handler. But there are 327 ftrace handler is registered\ [#]_. This stage is indicated by a value of '1' 336 Note that functions might be patched multiple times. The ftrace handler 339 The right implementation is selected by the ftrace handler, see 356 the ftrace handler is unregistered and the struct klp_ops is 378 patch are removed from the corresponding struct klp_ops. The ftrace handler 415 Livepatch is based on the dynamic ftrace. In particular, functions [all …]
|
/openbmc/linux/arch/arm64/kernel/ |
H A D | entry-ftrace.S | 3 * arch/arm64/kernel/entry-ftrace.S 13 #include <asm/ftrace.h> 30 * ftrace callbacks. So that we can get a sensible backtrace, we create frame 31 * records for the callsite and the ftrace entry assembly. This is not 67 /* Make room for ftrace regs, plus two frame records */ 86 /* Save the PC after the ftrace callsite */ 89 /* Create a frame record for the callsite above the ftrace regs */ 93 /* Create our frame record above the ftrace regs */ 189 * ftrace is enabled. 271 * This function is a counterpart of _mcount() in 'static' ftrace, and
|