Skip to content

Commit 4d4abdc

Browse files
committed
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (123 commits) perf: Remove the nmi parameter from the oprofile_perf backend x86, perf: Make copy_from_user_nmi() a library function perf: Remove perf_event_attr::type check x86, perf: P4 PMU - Fix typos in comments and style cleanup perf tools: Make test use the preset debugfs path perf tools: Add automated tests for events parsing perf tools: De-opt the parse_events function perf script: Fix display of IP address for non-callchain path perf tools: Fix endian conversion reading event attr from file header perf tools: Add missing 'node' alias to the hw_cache[] array perf probe: Support adding probes on offline kernel modules perf probe: Add probed module in front of function perf probe: Introduce debuginfo to encapsulate dwarf information perf-probe: Move dwarf library routines to dwarf-aux.{c, h} perf probe: Remove redundant dwarf functions perf probe: Move strtailcmp to string.c perf probe: Rename DIE_FIND_CB_FOUND to DIE_FIND_CB_END tracing/kprobe: Update symbol reference when loading module tracing/kprobes: Support module init function probing kprobes: Return -ENOENT if probe point doesn't exist ...
2 parents 0342cbc + 7fcfd1a commit 4d4abdc

140 files changed

Lines changed: 4650 additions & 2661 deletions

File tree

Some content is hidden

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

‎Documentation/trace/kprobetrace.txt‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ current_tracer. Instead of that, add probe points via
2222

2323
Synopsis of kprobe_events
2424
-------------------------
25-
p[:[GRP/]EVENT] SYMBOL[+offs]|MEMADDR [FETCHARGS] : Set a probe
26-
r[:[GRP/]EVENT] SYMBOL[+0] [FETCHARGS] : Set a return probe
25+
p[:[GRP/]EVENT] [MOD:]SYM[+offs]|MEMADDR [FETCHARGS] : Set a probe
26+
r[:[GRP/]EVENT] [MOD:]SYM[+0] [FETCHARGS] : Set a return probe
2727
-:[GRP/]EVENT : Clear a probe
2828

2929
GRP : Group name. If omitted, use "kprobes" for it.
3030
EVENT : Event name. If omitted, the event name is generated
31-
based on SYMBOL+offs or MEMADDR.
32-
SYMBOL[+offs] : Symbol+offset where the probe is inserted.
31+
based on SYM+offs or MEMADDR.
32+
MOD : Module name which has given SYM.
33+
SYM[+offs] : Symbol+offset where the probe is inserted.
3334
MEMADDR : Address where the probe is inserted.
3435

3536
FETCHARGS : Arguments. Each probe can have up to 128 args.

‎Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,7 @@ help:
12901290
@echo ' make O=dir [targets] Locate all output files in "dir", including .config'
12911291
@echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)'
12921292
@echo ' make C=2 [targets] Force check of all c source with $$CHECK'
1293+
@echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
12931294
@echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where'
12941295
@echo ' 1: warnings which may be relevant and do not occur too often'
12951296
@echo ' 2: warnings which occur quite often but may still be relevant'

‎arch/alpha/kernel/perf_event.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ static void alpha_perf_event_irq_handler(unsigned long la_ptr,
847847
data.period = event->hw.last_period;
848848

849849
if (alpha_perf_event_set_period(event, hwc, idx)) {
850-
if (perf_event_overflow(event, 1, &data, regs)) {
850+
if (perf_event_overflow(event, &data, regs)) {
851851
/* Interrupts coming too quickly; "throttle" the
852852
* counter, i.e., disable it for a little while.
853853
*/

‎arch/alpha/kernel/time.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ DEFINE_PER_CPU(u8, irq_work_pending);
9191
#define test_irq_work_pending() __get_cpu_var(irq_work_pending)
9292
#define clear_irq_work_pending() __get_cpu_var(irq_work_pending) = 0
9393

94-
void set_irq_work_pending(void)
94+
void arch_irq_work_raise(void)
9595
{
9696
set_irq_work_pending_flag();
9797
}

‎arch/arm/kernel/perf_event_v6.c‎

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,20 @@ static const unsigned armv6_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
173173
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
174174
},
175175
},
176+
[C(NODE)] = {
177+
[C(OP_READ)] = {
178+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
179+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
180+
},
181+
[C(OP_WRITE)] = {
182+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
183+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
184+
},
185+
[C(OP_PREFETCH)] = {
186+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
187+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
188+
},
189+
},
176190
};
177191

178192
enum armv6mpcore_perf_types {
@@ -310,6 +324,20 @@ static const unsigned armv6mpcore_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
310324
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
311325
},
312326
},
327+
[C(NODE)] = {
328+
[C(OP_READ)] = {
329+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
330+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
331+
},
332+
[C(OP_WRITE)] = {
333+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
334+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
335+
},
336+
[C(OP_PREFETCH)] = {
337+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
338+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
339+
},
340+
},
313341
};
314342

315343
static inline unsigned long
@@ -479,7 +507,7 @@ armv6pmu_handle_irq(int irq_num,
479507
if (!armpmu_event_set_period(event, hwc, idx))
480508
continue;
481509

482-
if (perf_event_overflow(event, 0, &data, regs))
510+
if (perf_event_overflow(event, &data, regs))
483511
armpmu->disable(hwc, idx);
484512
}
485513

‎arch/arm/kernel/perf_event_v7.c‎

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,20 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
255255
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
256256
},
257257
},
258+
[C(NODE)] = {
259+
[C(OP_READ)] = {
260+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
261+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
262+
},
263+
[C(OP_WRITE)] = {
264+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
265+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
266+
},
267+
[C(OP_PREFETCH)] = {
268+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
269+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
270+
},
271+
},
258272
};
259273

260274
/*
@@ -371,6 +385,20 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
371385
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
372386
},
373387
},
388+
[C(NODE)] = {
389+
[C(OP_READ)] = {
390+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
391+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
392+
},
393+
[C(OP_WRITE)] = {
394+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
395+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
396+
},
397+
[C(OP_PREFETCH)] = {
398+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
399+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
400+
},
401+
},
374402
};
375403

376404
/*
@@ -787,7 +815,7 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev)
787815
if (!armpmu_event_set_period(event, hwc, idx))
788816
continue;
789817

790-
if (perf_event_overflow(event, 0, &data, regs))
818+
if (perf_event_overflow(event, &data, regs))
791819
armpmu->disable(hwc, idx);
792820
}
793821

‎arch/arm/kernel/perf_event_xscale.c‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,20 @@ static const unsigned xscale_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
144144
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
145145
},
146146
},
147+
[C(NODE)] = {
148+
[C(OP_READ)] = {
149+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
150+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
151+
},
152+
[C(OP_WRITE)] = {
153+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
154+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
155+
},
156+
[C(OP_PREFETCH)] = {
157+
[C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
158+
[C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
159+
},
160+
},
147161
};
148162

149163
#define XSCALE_PMU_ENABLE 0x001
@@ -251,7 +265,7 @@ xscale1pmu_handle_irq(int irq_num, void *dev)
251265
if (!armpmu_event_set_period(event, hwc, idx))
252266
continue;
253267

254-
if (perf_event_overflow(event, 0, &data, regs))
268+
if (perf_event_overflow(event, &data, regs))
255269
armpmu->disable(hwc, idx);
256270
}
257271

@@ -583,7 +597,7 @@ xscale2pmu_handle_irq(int irq_num, void *dev)
583597
if (!armpmu_event_set_period(event, hwc, idx))
584598
continue;
585599

586-
if (perf_event_overflow(event, 0, &data, regs))
600+
if (perf_event_overflow(event, &data, regs))
587601
armpmu->disable(hwc, idx);
588602
}
589603

‎arch/arm/kernel/ptrace.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ static long ptrace_hbp_idx_to_num(int idx)
396396
/*
397397
* Handle hitting a HW-breakpoint.
398398
*/
399-
static void ptrace_hbptriggered(struct perf_event *bp, int unused,
399+
static void ptrace_hbptriggered(struct perf_event *bp,
400400
struct perf_sample_data *data,
401401
struct pt_regs *regs)
402402
{
@@ -479,7 +479,8 @@ static struct perf_event *ptrace_hbp_create(struct task_struct *tsk, int type)
479479
attr.bp_type = type;
480480
attr.disabled = 1;
481481

482-
return register_user_hw_breakpoint(&attr, ptrace_hbptriggered, tsk);
482+
return register_user_hw_breakpoint(&attr, ptrace_hbptriggered, NULL,
483+
tsk);
483484
}
484485

485486
static int ptrace_gethbpregs(struct task_struct *tsk, long num,

‎arch/arm/kernel/swp_emulate.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static int swp_handler(struct pt_regs *regs, unsigned int instr)
183183
unsigned int address, destreg, data, type;
184184
unsigned int res = 0;
185185

186-
perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, 0, regs, regs->ARM_pc);
186+
perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, regs->ARM_pc);
187187

188188
if (current->pid != previous_pid) {
189189
pr_debug("\"%s\" (%ld) uses deprecated SWP{B} instruction\n",

‎arch/arm/mm/fault.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,11 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
318318
fault = __do_page_fault(mm, addr, fsr, tsk);
319319
up_read(&mm->mmap_sem);
320320

321-
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, 0, regs, addr);
321+
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, addr);
322322
if (fault & VM_FAULT_MAJOR)
323-
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, 0, regs, addr);
323+
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, addr);
324324
else if (fault & VM_FAULT_MINOR)
325-
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, 0, regs, addr);
325+
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, addr);
326326

327327
/*
328328
* Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR

0 commit comments

Comments
 (0)