Skip to content

Commit a8944c5

Browse files
author
Ingo Molnar
committed
Merge tag 'perf-core-for-mingo-20160427' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - perf trace --pf maj/min/all works with --call-graph: (Arnaldo Carvalho de Melo) Tracing write syscalls and major page faults with callchains while starting firefox, limiting the stack to 5 frames: # perf trace -e write --pf maj --max-stack 5 firefox 589.549 ( 0.014 ms): firefox/15377 write(fd: 4, buf: 0x7fff80acc898, count: 151) = 151 [0xfaed] (/usr/lib64/libpthread-2.22.so) fire_glxtest_process+0x5c (/usr/lib64/firefox/libxul.so) InstallGdkErrorHandler+0x41 (/usr/lib64/firefox/libxul.so) XREMain::XRE_mainInit+0x12c (/usr/lib64/firefox/libxul.so) XREMain::XRE_main+0x1e4 (/usr/lib64/firefox/libxul.so) 760.704 ( 0.000 ms): firefox/15332 majfault [gtk_tree_view_accessible_get_type+0x0] => /usr/lib64/libgtk-3.so.0.1800.9@0xa0850 (x.) gtk_tree_view_accessible_get_type+0x0 (/usr/lib64/libgtk-3.so.0.1800.9) gtk_tree_view_class_intern_init+0x1a54 (/usr/lib64/libgtk-3.so.0.1800.9) g_type_class_ref+0x6dd (/usr/lib64/libgobject-2.0.so.0.4600.2) [0x115378] (/usr/lib64/libgnutls.so.30.6.3) This automagically selects "--call-graph dwarf", use "--call-graph fp" on systems where -fno-omit-frame-pointer was used to built the components of interest, to incur in less overhead, or tune "--call-graph dwarf" appropriately, see 'perf record --help'. - Allow /proc/sys/kernel/perf_event_max_stack, that defaults to the old hard coded value of PERF_MAX_STACK_DEPTH (127), useful for huge callstacks for things like Groovy, Ruby, etc, and also to reduce overhead by limiting it to a smaller value, upcoming work will allow this to be done per-event (Arnaldo Carvalho de Melo) - Make 'perf trace --min-stack' be honoured by --pf and --event (Arnaldo Carvalho de Melo) - Make 'perf evlist -v' decode perf_event_attr->branch_sample_type (Arnaldo Carvalho de Melo) # perf record --call lbr usleep 1 # perf evlist -v cycles:ppp: ... sample_type: IP|TID|TIME|CALLCHAIN|PERIOD|BRANCH_STACK, ... branch_sample_type: USER|CALL_STACK|NO_FLAGS|NO_CYCLES # - Clear dummy entry accumulated period, fixing such 'perf top/report' output as: (Kan Liang) 4769.98% 0.01% 0.00% 0.01% tchain_edit [kernel] [k] update_fast_timekeeper - System calls with pid_t arguments gets them augmented with the COMM event more thoroughly: # trace -e perf_event_open perf stat -e cycles -p 15608 6.876 ( 0.014 ms): perf_event_open(attr_uptr: 0x2ae20d8, pid: 15608 (hexchat), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 3 6.882 ( 0.005 ms): perf_event_open(attr_uptr: 0x2ae20d8, pid: 15639 (gmain), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 4 6.889 ( 0.005 ms): perf_event_open(attr_uptr: 0x2ae20d8, pid: 15640 (gdbus), cpu: -1, group_fd: -1, flags: FD_CLOEXEC) = 5 ^^^^^^^^^^^^^^^^^^ ^C - Fix offline module name mismatch issue in 'perf probe' (Ravi Bangoria) - Fix module probe issue if no dwarf support in (Ravi Bangoria) Assorted fixes: - Fix off-by-one in write_buildid() (Andrey Ryabinin) - Fix segfault when printing callchains in 'perf script' (Chris Phlipot) - Replace assignment with comparison on assert check in 'perf test' entry (Colin Ian King) - Fix off-by-one comparison in intel-pt code (Colin Ian King) - Close target file on error path in 'perf probe' (Masami Hiramatsu) - Set default kprobe group name if not given in 'perf probe' (Masami Hiramatsu) - Avoid partial perf_event_header reads (Wang Nan) Infrastructure changes: - Update x86's syscall_64.tbl copy, adding preadv2 & pwritev2 (Arnaldo Carvalho de Melo) - Make the x86 clean quiet wrt syscall table removal (Jiri Olsa) Cleanups: - Simplify wrapper for LOCK_PI in 'perf bench futex' (Davidlohr Bueso) - Remove duplicate const qualifier (Eric Engestrom) Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2 parents 67d6129 + 4cb9344 commit a8944c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+475
-179
lines changed

Documentation/sysctl/kernel.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ show up in /proc/sys/kernel:
6060
- panic_on_warn
6161
- perf_cpu_time_max_percent
6262
- perf_event_paranoid
63+
- perf_event_max_stack
6364
- pid_max
6465
- powersave-nap [ PPC only ]
6566
- printk
@@ -654,6 +655,19 @@ users (without CAP_SYS_ADMIN). The default value is 1.
654655

655656
==============================================================
656657

658+
perf_event_max_stack:
659+
660+
Controls maximum number of stack frames to copy for (attr.sample_type &
661+
PERF_SAMPLE_CALLCHAIN) configured events, for instance, when using
662+
'perf record -g' or 'perf trace --call-graph fp'.
663+
664+
This can only be done when no events are in use that have callchains
665+
enabled, otherwise writing to this file will return -EBUSY.
666+
667+
The default value is 127.
668+
669+
==============================================================
670+
657671
pid_max:
658672

659673
PID allocation wrap value. When the kernel's next PID value

arch/arm/kernel/perf_callchain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
7575

7676
tail = (struct frame_tail __user *)regs->ARM_fp - 1;
7777

78-
while ((entry->nr < PERF_MAX_STACK_DEPTH) &&
78+
while ((entry->nr < sysctl_perf_event_max_stack) &&
7979
tail && !((unsigned long)tail & 0x3))
8080
tail = user_backtrace(tail, entry);
8181
}

arch/arm64/kernel/perf_callchain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void perf_callchain_user(struct perf_callchain_entry *entry,
122122

123123
tail = (struct frame_tail __user *)regs->regs[29];
124124

125-
while (entry->nr < PERF_MAX_STACK_DEPTH &&
125+
while (entry->nr < sysctl_perf_event_max_stack &&
126126
tail && !((unsigned long)tail & 0xf))
127127
tail = user_backtrace(tail, entry);
128128
} else {
@@ -132,7 +132,7 @@ void perf_callchain_user(struct perf_callchain_entry *entry,
132132

133133
tail = (struct compat_frame_tail __user *)regs->compat_fp - 1;
134134

135-
while ((entry->nr < PERF_MAX_STACK_DEPTH) &&
135+
while ((entry->nr < sysctl_perf_event_max_stack) &&
136136
tail && !((unsigned long)tail & 0x3))
137137
tail = compat_user_backtrace(tail, entry);
138138
#endif

arch/metag/kernel/perf_callchain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
6565

6666
--frame;
6767

68-
while ((entry->nr < PERF_MAX_STACK_DEPTH) && frame)
68+
while ((entry->nr < sysctl_perf_event_max_stack) && frame)
6969
frame = user_backtrace(frame, entry);
7070
}
7171

arch/mips/kernel/perf_event.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static void save_raw_perf_callchain(struct perf_callchain_entry *entry,
3535
addr = *sp++;
3636
if (__kernel_text_address(addr)) {
3737
perf_callchain_store(entry, addr);
38-
if (entry->nr >= PERF_MAX_STACK_DEPTH)
38+
if (entry->nr >= sysctl_perf_event_max_stack)
3939
break;
4040
}
4141
}
@@ -59,7 +59,7 @@ void perf_callchain_kernel(struct perf_callchain_entry *entry,
5959
}
6060
do {
6161
perf_callchain_store(entry, pc);
62-
if (entry->nr >= PERF_MAX_STACK_DEPTH)
62+
if (entry->nr >= sysctl_perf_event_max_stack)
6363
break;
6464
pc = unwind_stack(current, &sp, pc, &ra);
6565
} while (pc);

arch/powerpc/perf/callchain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ static void perf_callchain_user_64(struct perf_callchain_entry *entry,
247247
sp = regs->gpr[1];
248248
perf_callchain_store(entry, next_ip);
249249

250-
while (entry->nr < PERF_MAX_STACK_DEPTH) {
250+
while (entry->nr < sysctl_perf_event_max_stack) {
251251
fp = (unsigned long __user *) sp;
252252
if (!valid_user_sp(sp, 1) || read_user_stack_64(fp, &next_sp))
253253
return;
@@ -453,7 +453,7 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry,
453453
sp = regs->gpr[1];
454454
perf_callchain_store(entry, next_ip);
455455

456-
while (entry->nr < PERF_MAX_STACK_DEPTH) {
456+
while (entry->nr < sysctl_perf_event_max_stack) {
457457
fp = (unsigned int __user *) (unsigned long) sp;
458458
if (!valid_user_sp(sp, 0) || read_user_stack_32(fp, &next_sp))
459459
return;

arch/sparc/kernel/perf_event.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,7 @@ void perf_callchain_kernel(struct perf_callchain_entry *entry,
17561756
}
17571757
}
17581758
#endif
1759-
} while (entry->nr < PERF_MAX_STACK_DEPTH);
1759+
} while (entry->nr < sysctl_perf_event_max_stack);
17601760
}
17611761

17621762
static inline int
@@ -1790,7 +1790,7 @@ static void perf_callchain_user_64(struct perf_callchain_entry *entry,
17901790
pc = sf.callers_pc;
17911791
ufp = (unsigned long)sf.fp + STACK_BIAS;
17921792
perf_callchain_store(entry, pc);
1793-
} while (entry->nr < PERF_MAX_STACK_DEPTH);
1793+
} while (entry->nr < sysctl_perf_event_max_stack);
17941794
}
17951795

17961796
static void perf_callchain_user_32(struct perf_callchain_entry *entry,
@@ -1822,7 +1822,7 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry,
18221822
ufp = (unsigned long)sf.fp;
18231823
}
18241824
perf_callchain_store(entry, pc);
1825-
} while (entry->nr < PERF_MAX_STACK_DEPTH);
1825+
} while (entry->nr < sysctl_perf_event_max_stack);
18261826
}
18271827

18281828
void

arch/x86/events/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2277,7 +2277,7 @@ perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry *entry)
22772277

22782278
fp = compat_ptr(ss_base + regs->bp);
22792279
pagefault_disable();
2280-
while (entry->nr < PERF_MAX_STACK_DEPTH) {
2280+
while (entry->nr < sysctl_perf_event_max_stack) {
22812281
unsigned long bytes;
22822282
frame.next_frame = 0;
22832283
frame.return_address = 0;
@@ -2337,7 +2337,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
23372337
return;
23382338

23392339
pagefault_disable();
2340-
while (entry->nr < PERF_MAX_STACK_DEPTH) {
2340+
while (entry->nr < sysctl_perf_event_max_stack) {
23412341
unsigned long bytes;
23422342
frame.next_frame = NULL;
23432343
frame.return_address = 0;

arch/xtensa/kernel/perf_event.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,14 +332,14 @@ static int callchain_trace(struct stackframe *frame, void *data)
332332
void perf_callchain_kernel(struct perf_callchain_entry *entry,
333333
struct pt_regs *regs)
334334
{
335-
xtensa_backtrace_kernel(regs, PERF_MAX_STACK_DEPTH,
335+
xtensa_backtrace_kernel(regs, sysctl_perf_event_max_stack,
336336
callchain_trace, NULL, entry);
337337
}
338338

339339
void perf_callchain_user(struct perf_callchain_entry *entry,
340340
struct pt_regs *regs)
341341
{
342-
xtensa_backtrace_user(regs, PERF_MAX_STACK_DEPTH,
342+
xtensa_backtrace_user(regs, sysctl_perf_event_max_stack,
343343
callchain_trace, entry);
344344
}
345345

include/linux/perf_event.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct perf_guest_info_callbacks {
5858

5959
struct perf_callchain_entry {
6060
__u64 nr;
61-
__u64 ip[PERF_MAX_STACK_DEPTH];
61+
__u64 ip[0]; /* /proc/sys/kernel/perf_event_max_stack */
6262
};
6363

6464
struct perf_raw_record {
@@ -993,9 +993,11 @@ get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user,
993993
extern int get_callchain_buffers(void);
994994
extern void put_callchain_buffers(void);
995995

996+
extern int sysctl_perf_event_max_stack;
997+
996998
static inline int perf_callchain_store(struct perf_callchain_entry *entry, u64 ip)
997999
{
998-
if (entry->nr < PERF_MAX_STACK_DEPTH) {
1000+
if (entry->nr < sysctl_perf_event_max_stack) {
9991001
entry->ip[entry->nr++] = ip;
10001002
return 0;
10011003
} else {
@@ -1017,6 +1019,8 @@ extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
10171019
void __user *buffer, size_t *lenp,
10181020
loff_t *ppos);
10191021

1022+
int perf_event_max_stack_handler(struct ctl_table *table, int write,
1023+
void __user *buffer, size_t *lenp, loff_t *ppos);
10201024

10211025
static inline bool perf_paranoid_tracepoint_raw(void)
10221026
{

kernel/bpf/stackmap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static struct bpf_map *stack_map_alloc(union bpf_attr *attr)
6666
/* check sanity of attributes */
6767
if (attr->max_entries == 0 || attr->key_size != 4 ||
6868
value_size < 8 || value_size % 8 ||
69-
value_size / 8 > PERF_MAX_STACK_DEPTH)
69+
value_size / 8 > sysctl_perf_event_max_stack)
7070
return ERR_PTR(-EINVAL);
7171

7272
/* hash table size must be power of 2 */
@@ -124,8 +124,8 @@ static u64 bpf_get_stackid(u64 r1, u64 r2, u64 flags, u64 r4, u64 r5)
124124
struct perf_callchain_entry *trace;
125125
struct stack_map_bucket *bucket, *new_bucket, *old_bucket;
126126
u32 max_depth = map->value_size / 8;
127-
/* stack_map_alloc() checks that max_depth <= PERF_MAX_STACK_DEPTH */
128-
u32 init_nr = PERF_MAX_STACK_DEPTH - max_depth;
127+
/* stack_map_alloc() checks that max_depth <= sysctl_perf_event_max_stack */
128+
u32 init_nr = sysctl_perf_event_max_stack - max_depth;
129129
u32 skip = flags & BPF_F_SKIP_FIELD_MASK;
130130
u32 hash, id, trace_nr, trace_len;
131131
bool user = flags & BPF_F_USER_STACK;
@@ -143,7 +143,7 @@ static u64 bpf_get_stackid(u64 r1, u64 r2, u64 flags, u64 r4, u64 r5)
143143
return -EFAULT;
144144

145145
/* get_perf_callchain() guarantees that trace->nr >= init_nr
146-
* and trace-nr <= PERF_MAX_STACK_DEPTH, so trace_nr <= max_depth
146+
* and trace-nr <= sysctl_perf_event_max_stack, so trace_nr <= max_depth
147147
*/
148148
trace_nr = trace->nr - init_nr;
149149

kernel/events/callchain.c

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ struct callchain_cpus_entries {
1818
struct perf_callchain_entry *cpu_entries[0];
1919
};
2020

21+
int sysctl_perf_event_max_stack __read_mostly = PERF_MAX_STACK_DEPTH;
22+
23+
static inline size_t perf_callchain_entry__sizeof(void)
24+
{
25+
return (sizeof(struct perf_callchain_entry) +
26+
sizeof(__u64) * sysctl_perf_event_max_stack);
27+
}
28+
2129
static DEFINE_PER_CPU(int, callchain_recursion[PERF_NR_CONTEXTS]);
2230
static atomic_t nr_callchain_events;
2331
static DEFINE_MUTEX(callchain_mutex);
@@ -73,7 +81,7 @@ static int alloc_callchain_buffers(void)
7381
if (!entries)
7482
return -ENOMEM;
7583

76-
size = sizeof(struct perf_callchain_entry) * PERF_NR_CONTEXTS;
84+
size = perf_callchain_entry__sizeof() * PERF_NR_CONTEXTS;
7785

7886
for_each_possible_cpu(cpu) {
7987
entries->cpu_entries[cpu] = kmalloc_node(size, GFP_KERNEL,
@@ -147,7 +155,8 @@ static struct perf_callchain_entry *get_callchain_entry(int *rctx)
147155

148156
cpu = smp_processor_id();
149157

150-
return &entries->cpu_entries[cpu][*rctx];
158+
return (((void *)entries->cpu_entries[cpu]) +
159+
(*rctx * perf_callchain_entry__sizeof()));
151160
}
152161

153162
static void
@@ -215,3 +224,25 @@ get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user,
215224

216225
return entry;
217226
}
227+
228+
int perf_event_max_stack_handler(struct ctl_table *table, int write,
229+
void __user *buffer, size_t *lenp, loff_t *ppos)
230+
{
231+
int new_value = sysctl_perf_event_max_stack, ret;
232+
struct ctl_table new_table = *table;
233+
234+
new_table.data = &new_value;
235+
ret = proc_dointvec_minmax(&new_table, write, buffer, lenp, ppos);
236+
if (ret || !write)
237+
return ret;
238+
239+
mutex_lock(&callchain_mutex);
240+
if (atomic_read(&nr_callchain_events))
241+
ret = -EBUSY;
242+
else
243+
sysctl_perf_event_max_stack = new_value;
244+
245+
mutex_unlock(&callchain_mutex);
246+
247+
return ret;
248+
}

kernel/sysctl.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ static int one_thousand = 1000;
130130
#ifdef CONFIG_PRINTK
131131
static int ten_thousand = 10000;
132132
#endif
133+
#ifdef CONFIG_PERF_EVENTS
134+
static int six_hundred_forty_kb = 640 * 1024;
135+
#endif
133136

134137
/* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */
135138
static unsigned long dirty_bytes_min = 2 * PAGE_SIZE;
@@ -1144,6 +1147,15 @@ static struct ctl_table kern_table[] = {
11441147
.extra1 = &zero,
11451148
.extra2 = &one_hundred,
11461149
},
1150+
{
1151+
.procname = "perf_event_max_stack",
1152+
.data = NULL, /* filled in by handler */
1153+
.maxlen = sizeof(sysctl_perf_event_max_stack),
1154+
.mode = 0644,
1155+
.proc_handler = perf_event_max_stack_handler,
1156+
.extra1 = &zero,
1157+
.extra2 = &six_hundred_forty_kb,
1158+
},
11471159
#endif
11481160
#ifdef CONFIG_KMEMCHECK
11491161
{

tools/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ libsubcmd_clean:
137137
$(call descend,lib/subcmd,clean)
138138

139139
perf_clean:
140-
$(call descend,$(@:_clean=),clean)
140+
$(Q)mkdir -p $(PERF_O) .
141+
$(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= clean
141142

142143
selftests_clean:
143144
$(call descend,testing/$(@:_clean=),clean)

tools/lib/api/fs/fs.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,19 @@ int filename__read_str(const char *filename, char **buf, size_t *sizep)
351351
return err;
352352
}
353353

354+
int procfs__read_str(const char *entry, char **buf, size_t *sizep)
355+
{
356+
char path[PATH_MAX];
357+
const char *procfs = procfs__mountpoint();
358+
359+
if (!procfs)
360+
return -1;
361+
362+
snprintf(path, sizeof(path), "%s/%s", procfs, entry);
363+
364+
return filename__read_str(path, buf, sizep);
365+
}
366+
354367
int sysfs__read_ull(const char *entry, unsigned long long *value)
355368
{
356369
char path[PATH_MAX];

tools/lib/api/fs/fs.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ int filename__read_int(const char *filename, int *value);
2929
int filename__read_ull(const char *filename, unsigned long long *value);
3030
int filename__read_str(const char *filename, char **buf, size_t *sizep);
3131

32+
int procfs__read_str(const char *entry, char **buf, size_t *sizep);
33+
3234
int sysctl__read_int(const char *sysctl, int *value);
3335
int sysfs__read_int(const char *entry, int *value);
3436
int sysfs__read_ull(const char *entry, unsigned long long *value);

tools/perf/Documentation/perf-report.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ OPTIONS
248248
Note that when using the --itrace option the synthesized callchain size
249249
will override this value if the synthesized callchain size is bigger.
250250

251-
Default: 127
251+
Default: /proc/sys/kernel/perf_event_max_stack when present, 127 otherwise.
252252

253253
-G::
254254
--inverted::

tools/perf/Documentation/perf-script.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ include::itrace.txt[]
267267
Note that when using the --itrace option the synthesized callchain size
268268
will override this value if the synthesized callchain size is bigger.
269269

270-
Default: 127
270+
Default: /proc/sys/kernel/perf_event_max_stack when present, 127 otherwise.
271271

272272
--ns::
273273
Use 9 decimal places when displaying time (i.e. show the nanoseconds)

tools/perf/Documentation/perf-top.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Default is to monitor all CPUS.
177177
between information loss and faster processing especially for
178178
workloads that can have a very long callchain stack.
179179

180-
Default: 127
180+
Default: /proc/sys/kernel/perf_event_max_stack when present, 127 otherwise.
181181

182182
--ignore-callees=<regex>::
183183
Ignore callees of the function(s) matching the given regex.

tools/perf/Documentation/perf-trace.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ the thread executes on the designated CPUs. Default is to monitor all CPUs.
143143
Implies '--call-graph dwarf' when --call-graph not present on the
144144
command line, on systems where DWARF unwinding was built in.
145145

146-
Default: 127
146+
Default: /proc/sys/kernel/perf_event_max_stack when present, 127 otherwise.
147147

148148
--min-stack::
149149
Set the stack depth limit when parsing the callchain, anything

tools/perf/arch/x86/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ $(header): $(sys)/syscall_64.tbl $(systbl)
2424
$(Q)$(SHELL) '$(systbl)' $(sys)/syscall_64.tbl 'x86_64' > $@
2525

2626
clean::
27-
rm -f $(header)
27+
$(call QUIET_CLEAN, x86) $(RM) $(header)
2828

2929
archheaders: $(header)

tools/perf/arch/x86/entry/syscalls/syscall_64.tbl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@
333333
324 common membarrier sys_membarrier
334334
325 common mlock2 sys_mlock2
335335
326 common copy_file_range sys_copy_file_range
336+
327 64 preadv2 sys_preadv2
337+
328 64 pwritev2 sys_pwritev2
336338

337339
#
338340
# x32-specific system call numbers start at 512 to avoid cache impact

0 commit comments

Comments
 (0)