Skip to content

Commit e506d1d

Browse files
author
Peter Zijlstra
committed
perf/x86: Make dummy_iregs static
Having pt_regs on-stack is unfortunate, it's 168 bytes. Since it isn't actually used, make it a static variable. This both gets if off the stack and ensures it gets 0 initialized, just in case someone does look at it. Reported-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20201030151955.324273677@infradead.org
1 parent 76a4efa commit e506d1d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • arch/x86/events/intel

arch/x86/events/intel/ds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1738,7 +1738,7 @@ __intel_pmu_pebs_event(struct perf_event *event,
17381738
struct x86_perf_regs perf_regs;
17391739
struct pt_regs *regs = &perf_regs.regs;
17401740
void *at = get_next_pebs_record_by_bit(base, top, bit);
1741-
struct pt_regs dummy_iregs;
1741+
static struct pt_regs dummy_iregs;
17421742

17431743
if (hwc->flags & PERF_X86_EVENT_AUTO_RELOAD) {
17441744
/*

0 commit comments

Comments
 (0)