1595c3649SMasami Hiramatsuperf-probe(1) 2595c3649SMasami Hiramatsu============= 3595c3649SMasami Hiramatsu 4595c3649SMasami HiramatsuNAME 5595c3649SMasami Hiramatsu---- 6595c3649SMasami Hiramatsuperf-probe - Define new dynamic tracepoints 7595c3649SMasami Hiramatsu 8595c3649SMasami HiramatsuSYNOPSIS 9595c3649SMasami Hiramatsu-------- 10595c3649SMasami Hiramatsu[verse] 11c937fe20SMasami Hiramatsu'perf probe' [options] --add='PROBE' [...] 12c43f9d1eSMasami Hiramatsuor 13c937fe20SMasami Hiramatsu'perf probe' [options] PROBE 14c937fe20SMasami Hiramatsuor 15c937fe20SMasami Hiramatsu'perf probe' [options] --del='[GROUP:]EVENT' [...] 16c937fe20SMasami Hiramatsuor 17b6a89643SMasami Hiramatsu'perf probe' --list[=[GROUP:]EVENT] 18631c9defSMasami Hiramatsuor 19e116dfa1SMasami Hiramatsu'perf probe' [options] --line='LINE' 20cf6eb489SMasami Hiramatsuor 21469b9b88SMasami Hiramatsu'perf probe' [options] --vars='PROBEPOINT' 22b3ac032bSMasami Hiramatsuor 23b3ac032bSMasami Hiramatsu'perf probe' [options] --funcs 241c20b1d1SMasami Hiramatsuor 251c20b1d1SMasami Hiramatsu'perf probe' [options] --definition='PROBE' [...] 26595c3649SMasami Hiramatsu 27595c3649SMasami HiramatsuDESCRIPTION 28595c3649SMasami Hiramatsu----------- 29595c3649SMasami HiramatsuThis command defines dynamic tracepoint events, by symbol and registers 30595c3649SMasami Hiramatsuwithout debuginfo, or by C expressions (C line numbers, C function names, 31595c3649SMasami Hiramatsuand C local variables) with debuginfo. 32595c3649SMasami Hiramatsu 33595c3649SMasami Hiramatsu 34595c3649SMasami HiramatsuOPTIONS 35595c3649SMasami Hiramatsu------- 36595c3649SMasami Hiramatsu-k:: 37c43f9d1eSMasami Hiramatsu--vmlinux=PATH:: 38595c3649SMasami Hiramatsu Specify vmlinux path which has debuginfo (Dwarf binary). 39428aff82SMasami Hiramatsu Only when using this with --definition, you can give an offline 40428aff82SMasami Hiramatsu vmlinux file. 41595c3649SMasami Hiramatsu 42469b9b88SMasami Hiramatsu-m:: 4314a8fd7cSMasami Hiramatsu--module=MODNAME|PATH:: 44469b9b88SMasami Hiramatsu Specify module name in which perf-probe searches probe points 4514a8fd7cSMasami Hiramatsu or lines. If a path of module file is passed, perf-probe 4614a8fd7cSMasami Hiramatsu treat it as an offline module (this means you can add a probe on 4714a8fd7cSMasami Hiramatsu a module which has not been loaded yet). 48469b9b88SMasami Hiramatsu 499ed7e1b8SChase Douglas-s:: 509ed7e1b8SChase Douglas--source=PATH:: 519ed7e1b8SChase Douglas Specify path to kernel source. 529ed7e1b8SChase Douglas 53595c3649SMasami Hiramatsu-v:: 54595c3649SMasami Hiramatsu--verbose:: 55595c3649SMasami Hiramatsu Be more verbose (show parsed arguments, etc). 568b72805fSMasami Hiramatsu Can not use with -q. 578b72805fSMasami Hiramatsu 588b72805fSMasami Hiramatsu-q:: 598b72805fSMasami Hiramatsu--quiet:: 60*a527c2c1SJames Clark Do not show any warnings or messages. 618b72805fSMasami Hiramatsu Can not use with -v. 62595c3649SMasami Hiramatsu 63c43f9d1eSMasami Hiramatsu-a:: 64c937fe20SMasami Hiramatsu--add=:: 65c937fe20SMasami Hiramatsu Define a probe event (see PROBE SYNTAX for detail). 66c937fe20SMasami Hiramatsu 67c937fe20SMasami Hiramatsu-d:: 68c937fe20SMasami Hiramatsu--del=:: 69ee391de8SMasami Hiramatsu Delete probe events. This accepts glob wildcards('*', '?') and character 70ee391de8SMasami Hiramatsu classes(e.g. [a-z], [!A-Z]). 71c937fe20SMasami Hiramatsu 72c937fe20SMasami Hiramatsu-l:: 73b6a89643SMasami Hiramatsu--list[=[GROUP:]EVENT]:: 741f3736c9SMasami Hiramatsu List up current probe events. This can also accept filtering patterns of 751f3736c9SMasami Hiramatsu event names. 761f3736c9SMasami Hiramatsu When this is used with --cache, perf shows all cached probes instead of 771f3736c9SMasami Hiramatsu the live probes. 78595c3649SMasami Hiramatsu 79631c9defSMasami Hiramatsu-L:: 80631c9defSMasami Hiramatsu--line=:: 81631c9defSMasami Hiramatsu Show source code lines which can be probed. This needs an argument 82ee391de8SMasami Hiramatsu which specifies a range of the source code. (see LINE SYNTAX for detail) 83ee391de8SMasami Hiramatsu 84cf6eb489SMasami Hiramatsu-V:: 85cf6eb489SMasami Hiramatsu--vars=:: 86cf6eb489SMasami Hiramatsu Show available local variables at given probe point. The argument 87cf6eb489SMasami Hiramatsu syntax is same as PROBE SYNTAX, but NO ARGs. 88cf6eb489SMasami Hiramatsu 89fb8c5a56SMasami Hiramatsu--externs:: 90fb8c5a56SMasami Hiramatsu (Only for --vars) Show external defined variables in addition to local 91fb8c5a56SMasami Hiramatsu variables. 92fb8c5a56SMasami Hiramatsu 936cfd1f68SMasami Hiramatsu--no-inlines:: 946cfd1f68SMasami Hiramatsu (Only for --add) Search only for non-inlined functions. The functions 956cfd1f68SMasami Hiramatsu which do not have instances are ignored. 966cfd1f68SMasami Hiramatsu 97e80711caSMasami Hiramatsu-F:: 989f7811d0SMasami Hiramatsu--funcs[=FILTER]:: 99225466f1SSrikar Dronamraju Show available functions in given module or kernel. With -x/--exec, 100225466f1SSrikar Dronamraju can also list functions in a user space executable / shared library. 1019f7811d0SMasami Hiramatsu This also can accept a FILTER rule argument. 102e80711caSMasami Hiramatsu 1031c20b1d1SMasami Hiramatsu-D:: 1041c20b1d1SMasami Hiramatsu--definition=:: 1051c20b1d1SMasami Hiramatsu Show trace-event definition converted from given probe-event instead 1061c20b1d1SMasami Hiramatsu of write it into tracing/[k,u]probe_events. 1071c20b1d1SMasami Hiramatsu 108bd09d7b5SMasami Hiramatsu--filter=FILTER:: 1093c42258cSMasami Hiramatsu (Only for --vars and --funcs) Set filter. FILTER is a combination of glob 1103c42258cSMasami Hiramatsu pattern, see FILTER PATTERN for detail. 1113c42258cSMasami Hiramatsu Default FILTER is "!__k???tab_* & !__crc_*" for --vars, and "!_*" 1123c42258cSMasami Hiramatsu for --funcs. 1133c42258cSMasami Hiramatsu If several filters are specified, only the last filter is used. 114bd09d7b5SMasami Hiramatsu 115ee391de8SMasami Hiramatsu-f:: 116ee391de8SMasami Hiramatsu--force:: 117ee391de8SMasami Hiramatsu Forcibly add events with existing name. 118631c9defSMasami Hiramatsu 119f4d7da49SMasami Hiramatsu-n:: 120f4d7da49SMasami Hiramatsu--dry-run:: 121f4d7da49SMasami Hiramatsu Dry run. With this option, --add and --del doesn't execute actual 122f4d7da49SMasami Hiramatsu adding and removal operations. 123f4d7da49SMasami Hiramatsu 1242fd457a3SMasami Hiramatsu--cache:: 1251f3736c9SMasami Hiramatsu (With --add) Cache the probes. Any events which successfully added 1262fd457a3SMasami Hiramatsu are also stored in the cache file. 1271f3736c9SMasami Hiramatsu (With --list) Show cached probes. 1284a0f65c1SMasami Hiramatsu (With --del) Remove cached probes. 1292fd457a3SMasami Hiramatsu 1308b72805fSMasami Hiramatsu--max-probes=NUM:: 131ef4a3565SMasami Hiramatsu Set the maximum number of probe points for an event. Default is 128. 132ef4a3565SMasami Hiramatsu 133544abd44SKrister Johansen--target-ns=PID: 134544abd44SKrister Johansen Obtain mount namespace information from the target pid. This is 135544abd44SKrister Johansen used when creating a uprobe for a process that resides in a 136544abd44SKrister Johansen different mount namespace from the perf(1) utility. 137544abd44SKrister Johansen 138225466f1SSrikar Dronamraju-x:: 139225466f1SSrikar Dronamraju--exec=PATH:: 140225466f1SSrikar Dronamraju Specify path to the executable or shared library file for user 141225466f1SSrikar Dronamraju space tracing. Can also be used with --funcs option. 142225466f1SSrikar Dronamraju 1438b72805fSMasami Hiramatsu--demangle:: 1448b72805fSMasami Hiramatsu Demangle application symbols. --no-demangle is also available 1458b72805fSMasami Hiramatsu for disabling demangling. 1468b72805fSMasami Hiramatsu 147763122adSAvi Kivity--demangle-kernel:: 1488b72805fSMasami Hiramatsu Demangle kernel symbols. --no-demangle-kernel is also available 1498b72805fSMasami Hiramatsu for disabling kernel demangling. 150763122adSAvi Kivity 15173eff9f5SSrikar DronamrajuIn absence of -m/-x options, perf probe checks if the first argument after 15273eff9f5SSrikar Dronamrajuthe options is an absolute path name. If its an absolute path, perf probe 15373eff9f5SSrikar Dronamrajuuses it as a target module/target user space binary to probe. 15473eff9f5SSrikar Dronamraju 155595c3649SMasami HiramatsuPROBE SYNTAX 156595c3649SMasami Hiramatsu------------ 157595c3649SMasami HiramatsuProbe points are defined by following syntax. 158595c3649SMasami Hiramatsu 1592a9c8c36SMasami Hiramatsu 1) Define event based on function name 1608d993d96SMasami Hiramatsu [[GROUP:]EVENT=]FUNC[@SRC][:RLN|+OFFS|%return|;PTN] [ARG ...] 1612a9c8c36SMasami Hiramatsu 1622a9c8c36SMasami Hiramatsu 2) Define event based on source file with line number 1638d993d96SMasami Hiramatsu [[GROUP:]EVENT=]SRC:ALN [ARG ...] 1642a9c8c36SMasami Hiramatsu 1652a9c8c36SMasami Hiramatsu 3) Define event based on source file with lazy pattern 1668d993d96SMasami Hiramatsu [[GROUP:]EVENT=]SRC;PTN [ARG ...] 1672a9c8c36SMasami Hiramatsu 16836a009feSMasami Hiramatsu 4) Pre-defined SDT events or cached event with name 1697e9fca51SMasami Hiramatsu %[sdt_PROVIDER:]SDTEVENT 1707e9fca51SMasami Hiramatsu or, 1717e9fca51SMasami Hiramatsu sdt_PROVIDER:SDTEVENT 172595c3649SMasami Hiramatsu 173e63c625aSMasami Hiramatsu'EVENT' specifies the name of new event, if omitted, it will be set the name of the probed function, and for return probes, a "\_\_return" suffix is automatically added to the function name. You can also specify a group name by 'GROUP', if omitted, set 'probe' is used for kprobe and 'probe_<bin>' is used for uprobe. 1748d993d96SMasami HiramatsuNote that using existing group name can conflict with other events. Especially, using the group name reserved for kernel modules can hide embedded events in the 1758d993d96SMasami Hiramatsumodules. 1762a9c8c36SMasami Hiramatsu'FUNC' specifies a probed function name, and it may have one of the following options; '+OFFS' is the offset from function entry address in bytes, ':RLN' is the relative-line number from function entry line, and '%return' means that it probes function return. And ';PTN' means lazy matching pattern (see LAZY MATCHING). Note that ';PTN' must be the end of the probe point definition. In addition, '@SRC' specifies a source file which has that function. 1772a9c8c36SMasami HiramatsuIt is also possible to specify a probe point by the source line number or lazy matching by using 'SRC:ALN' or 'SRC;PTN' syntax, where 'SRC' is the source file path, ':ALN' is the line number and ';PTN' is the lazy matching pattern. 17848481938SMasami Hiramatsu'ARG' specifies the arguments of this probe point, (see PROBE ARGUMENT). 17936a009feSMasami Hiramatsu'SDTEVENT' and 'PROVIDER' is the pre-defined event name which is defined by user SDT (Statically Defined Tracing) or the pre-cached probes with event name. 18036a009feSMasami HiramatsuNote that before using the SDT event, the target binary (on which SDT events are defined) must be scanned by linkperf:perf-buildid-cache[1] to make SDT events as cached events. 18136a009feSMasami Hiramatsu 18236a009feSMasami HiramatsuFor details of the SDT, see below. 18336a009feSMasami Hiramatsuhttps://sourceware.org/gdb/onlinedocs/gdb/Static-Probe-Points.html 18448481938SMasami Hiramatsu 185c588d158SMasami HiramatsuESCAPED CHARACTER 186c588d158SMasami Hiramatsu----------------- 187c588d158SMasami Hiramatsu 188c588d158SMasami HiramatsuIn the probe syntax, '=', '@', '+', ':' and ';' are treated as a special character. You can use a backslash ('\') to escape the special characters. 189c588d158SMasami HiramatsuThis is useful if you need to probe on a specific versioned symbols, like @GLIBC_... suffixes, or also you need to specify a source file which includes the special characters. 190c588d158SMasami HiramatsuNote that usually single backslash is consumed by shell, so you might need to pass double backslash (\\) or wrapping with single quotes (\'AAA\@BBB'). 191c588d158SMasami HiramatsuSee EXAMPLES how it is used. 192c588d158SMasami Hiramatsu 19348481938SMasami HiramatsuPROBE ARGUMENT 19448481938SMasami Hiramatsu-------------- 19548481938SMasami HiramatsuEach probe argument follows below syntax. 19648481938SMasami Hiramatsu 1971e032f7cSMasami Hiramatsu [NAME=]LOCALVAR|$retval|%REG|@SYMBOL[:TYPE][@user] 19848481938SMasami Hiramatsu 199b2a3c12bSMasami Hiramatsu'NAME' specifies the name of this argument (optional). You can use the name of local variable, local data structure member (e.g. var->field, var.field2), local array with fixed index (e.g. array[1], var->array[0], var->pointer[2]), or kprobe-tracer argument format (e.g. $retval, %ax, etc). Note that the name of this argument will be set as the last member name if you specify a local data structure member (e.g. field2 for 'var->field1.field2'.) 200f8bffbf1SMasami Hiramatsu'$vars' and '$params' special arguments are also available for NAME, '$vars' is expanded to the local variables (including function parameters) which can access at given probe point. '$params' is expanded to only the function parameters. 201bdca79c2SMasami Hiramatsu'TYPE' casts the type of this argument (optional). If omitted, perf probe automatically set the type based on debuginfo (*). Currently, basic types (u8/u16/u32/u64/s8/s16/s32/s64), hexadecimal integers (x/x8/x16/x32/x64), signedness casting (u/s), "string" and bitfield are supported. (see TYPES for detail) 2025b439820SAndi KleenOn x86 systems %REG is always the short form of the register: for example %AX. %RAX or %EAX is not valid. 2031e032f7cSMasami Hiramatsu"@user" is a special attribute which means the LOCALVAR will be treated as a user-space memory. This is only valid for kprobe event. 2045b439820SAndi Kleen 20519f00b01SNaohiro AotaTYPES 20619f00b01SNaohiro Aota----- 207bdca79c2SMasami HiramatsuBasic types (u8/u16/u32/u64/s8/s16/s32/s64) and hexadecimal integers (x8/x16/x32/x64) are integer types. Prefix 's' and 'u' means those types are signed and unsigned respectively, and 'x' means that is shown in hexadecimal format. Traced arguments are shown in decimal (sNN/uNN) or hex (xNN). You can also use 's' or 'u' to specify only signedness and leave its size auto-detected by perf probe. Moreover, you can use 'x' to explicitly specify to be shown in hexadecimal (the size is also auto-detected). 20819f00b01SNaohiro AotaString type is a special type, which fetches a "null-terminated" string from kernel space. This means it will fail and store NULL if the string container has been paged out. You can specify 'string' type only for the local variable or structure member which is an array of or a pointer to 'char' or 'unsigned char' type. 20919f00b01SNaohiro AotaBitfield is another special type, which takes 3 parameters, bit-width, bit-offset, and container-size (usually 32). The syntax is; 21019f00b01SNaohiro Aota 21119f00b01SNaohiro Aota b<bit-width>@<bit-offset>/<container-size> 21219f00b01SNaohiro Aota 213631c9defSMasami HiramatsuLINE SYNTAX 214631c9defSMasami Hiramatsu----------- 2159d5b7f5bSShawn BohrerLine range is described by following syntax. 216631c9defSMasami Hiramatsu 217e116dfa1SMasami Hiramatsu "FUNC[@SRC][:RLN[+NUM|-RLN2]]|SRC[:ALN[+NUM|-ALN2]]" 218631c9defSMasami Hiramatsu 219631c9defSMasami HiramatsuFUNC specifies the function name of showing lines. 'RLN' is the start line 220631c9defSMasami Hiramatsunumber from function entry line, and 'RLN2' is the end line number. As same as 221631c9defSMasami Hiramatsuprobe syntax, 'SRC' means the source file path, 'ALN' is start line number, 222631c9defSMasami Hiramatsuand 'ALN2' is end line number in the file. It is also possible to specify how 223e116dfa1SMasami Hiramatsumany lines to show by using 'NUM'. Moreover, 'FUNC@SRC' combination is good 224e116dfa1SMasami Hiramatsufor searching a specific function when several functions share same name. 225631c9defSMasami HiramatsuSo, "source.c:100-120" shows lines between 100th to l20th in source.c file. And "func:10+20" shows 20 lines from 10th line of func function. 226631c9defSMasami Hiramatsu 2272a9c8c36SMasami HiramatsuLAZY MATCHING 2282a9c8c36SMasami Hiramatsu------------- 2292a9c8c36SMasami HiramatsuThe lazy line matching is similar to glob matching but ignoring spaces in both of pattern and target. So this accepts wildcards('*', '?') and character classes(e.g. [a-z], [!A-Z]). 2302a9c8c36SMasami Hiramatsu 2312a9c8c36SMasami Hiramatsue.g. 2322a9c8c36SMasami Hiramatsu 'a=*' can matches 'a=b', 'a = b', 'a == b' and so on. 2332a9c8c36SMasami Hiramatsu 2342a9c8c36SMasami HiramatsuThis provides some sort of flexibility and robustness to probe point definitions against minor code changes. For example, actual 10th line of schedule() can be moved easily by modifying schedule(), but the same line matching 'rq=cpu_rq*' may still exist in the function.) 2352a9c8c36SMasami Hiramatsu 236bd09d7b5SMasami HiramatsuFILTER PATTERN 237bd09d7b5SMasami Hiramatsu-------------- 238bd09d7b5SMasami HiramatsuThe filter pattern is a glob matching pattern(s) to filter variables. 239bd09d7b5SMasami HiramatsuIn addition, you can use "!" for specifying filter-out rule. You also can give several rules combined with "&" or "|", and fold those rules as one rule by using "(" ")". 240bd09d7b5SMasami Hiramatsu 241bd09d7b5SMasami Hiramatsue.g. 242bd09d7b5SMasami Hiramatsu With --filter "foo* | bar*", perf probe -V shows variables which start with "foo" or "bar". 243bd09d7b5SMasami Hiramatsu With --filter "!foo* & *bar", perf probe -V shows variables which don't start with "foo" and end with "bar", like "fizzbar". But "foobar" is filtered out. 2442a9c8c36SMasami Hiramatsu 245ee391de8SMasami HiramatsuEXAMPLES 246ee391de8SMasami Hiramatsu-------- 247ee391de8SMasami HiramatsuDisplay which lines in schedule() can be probed: 248ee391de8SMasami Hiramatsu 249ee391de8SMasami Hiramatsu ./perf probe --line schedule 250ee391de8SMasami Hiramatsu 251ee391de8SMasami HiramatsuAdd a probe on schedule() function 12th line with recording cpu local variable: 252ee391de8SMasami Hiramatsu 253ee391de8SMasami Hiramatsu ./perf probe schedule:12 cpu 254ee391de8SMasami Hiramatsu or 255ee391de8SMasami Hiramatsu ./perf probe --add='schedule:12 cpu' 256ee391de8SMasami Hiramatsu 257d89269a8SSeongJae ParkAdd one or more probes which has the name start with "schedule". 258d89269a8SSeongJae Park 259d89269a8SSeongJae Park ./perf probe schedule* 260d89269a8SSeongJae Park or 261d89269a8SSeongJae Park ./perf probe --add='schedule*' 262ee391de8SMasami Hiramatsu 2632a9c8c36SMasami HiramatsuAdd probes on lines in schedule() function which calls update_rq_clock(). 2642a9c8c36SMasami Hiramatsu 2652a9c8c36SMasami Hiramatsu ./perf probe 'schedule;update_rq_clock*' 2662a9c8c36SMasami Hiramatsu or 2672a9c8c36SMasami Hiramatsu ./perf probe --add='schedule;update_rq_clock*' 2682a9c8c36SMasami Hiramatsu 269ee391de8SMasami HiramatsuDelete all probes on schedule(). 270ee391de8SMasami Hiramatsu 271ee391de8SMasami Hiramatsu ./perf probe --del='schedule*' 272ee391de8SMasami Hiramatsu 273225466f1SSrikar DronamrajuAdd probes at zfree() function on /bin/zsh 274225466f1SSrikar Dronamraju 27573eff9f5SSrikar Dronamraju ./perf probe -x /bin/zsh zfree or ./perf probe /bin/zsh zfree 276225466f1SSrikar Dronamraju 277225466f1SSrikar DronamrajuAdd probes at malloc() function on libc 278225466f1SSrikar Dronamraju 27973eff9f5SSrikar Dronamraju ./perf probe -x /lib/libc.so.6 malloc or ./perf probe /lib/libc.so.6 malloc 280ee391de8SMasami Hiramatsu 281544abd44SKrister JohansenAdd a uprobe to a target process running in a different mount namespace 282544abd44SKrister Johansen 283544abd44SKrister Johansen ./perf probe --target-ns <target pid> -x /lib64/libc.so.6 malloc 284544abd44SKrister Johansen 285f045b8c4SKrister JohansenAdd a USDT probe to a target process running in a different mount namespace 286f045b8c4SKrister Johansen 287f045b8c4SKrister Johansen ./perf probe --target-ns <target pid> -x /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64/jre/lib/amd64/server/libjvm.so %sdt_hotspot:thread__sleep__end 288f045b8c4SKrister Johansen 289c588d158SMasami HiramatsuAdd a probe on specific versioned symbol by backslash escape 290c588d158SMasami Hiramatsu 291c588d158SMasami Hiramatsu ./perf probe -x /lib64/libc-2.25.so 'malloc_get_state\@GLIBC_2.2.5' 292c588d158SMasami Hiramatsu 293c588d158SMasami HiramatsuAdd a probe in a source file using special characters by backslash escape 294c588d158SMasami Hiramatsu 295c588d158SMasami Hiramatsu ./perf probe -x /opt/test/a.out 'foo\+bar.c:4' 296fe4f3eb1SMasami Hiramatsu 297fe4f3eb1SMasami Hiramatsu 298fe4f3eb1SMasami HiramatsuPERMISSIONS AND SYSCTL 299fe4f3eb1SMasami Hiramatsu---------------------- 300fe4f3eb1SMasami HiramatsuSince perf probe depends on ftrace (tracefs) and kallsyms (/proc/kallsyms), you have to care about the permission and some sysctl knobs. 301fe4f3eb1SMasami Hiramatsu 302fe4f3eb1SMasami Hiramatsu - Since tracefs and kallsyms requires root or privileged user to access it, the following perf probe commands also require it; --add, --del, --list (except for --cache option) 303fe4f3eb1SMasami Hiramatsu 304fe4f3eb1SMasami Hiramatsu - The system admin can remount the tracefs with 755 (`sudo mount -o remount,mode=755 /sys/kernel/tracing/`) to allow unprivileged user to run the perf probe --list command. 305fe4f3eb1SMasami Hiramatsu 306fe4f3eb1SMasami Hiramatsu - /proc/sys/kernel/kptr_restrict = 2 (restrict all users) also prevents perf probe to retrieve the important information from kallsyms. You also need to set to 1 (restrict non CAP_SYSLOG users) for the above commands. Since the user-space probe doesn't need to access kallsyms, this is only for probing the kernel function (kprobes). 307fe4f3eb1SMasami Hiramatsu 308fe4f3eb1SMasami Hiramatsu - Since the perf probe commands read the vmlinux (for kernel) and/or the debuginfo file (including user-space application), you need to ensure that you can read those files. 309c588d158SMasami Hiramatsu 310f045b8c4SKrister Johansen 311595c3649SMasami HiramatsuSEE ALSO 312595c3649SMasami Hiramatsu-------- 31336a009feSMasami Hiramatsulinkperf:perf-trace[1], linkperf:perf-record[1], linkperf:perf-buildid-cache[1] 314