2017-10-25 15:03:49 +08:00
|
|
|
generic-y += asm-offsets.h
|
|
|
|
generic-y += atomic.h
|
|
|
|
generic-y += bitops.h
|
|
|
|
generic-y += bug.h
|
|
|
|
generic-y += bugs.h
|
|
|
|
generic-y += checksum.h
|
|
|
|
generic-y += cmpxchg.h
|
2018-03-26 22:59:15 +08:00
|
|
|
generic-y += compat.h
|
2017-10-25 15:03:49 +08:00
|
|
|
generic-y += device.h
|
|
|
|
generic-y += div64.h
|
|
|
|
generic-y += dma.h
|
2018-05-28 15:55:35 +08:00
|
|
|
generic-y += dma-mapping.h
|
2017-10-25 15:03:49 +08:00
|
|
|
generic-y += emergency-restart.h
|
|
|
|
generic-y += exec.h
|
2018-04-19 15:45:45 +08:00
|
|
|
generic-y += export.h
|
2017-10-25 15:03:49 +08:00
|
|
|
generic-y += fb.h
|
|
|
|
generic-y += gpio.h
|
|
|
|
generic-y += hardirq.h
|
|
|
|
generic-y += hw_irq.h
|
|
|
|
generic-y += irq.h
|
|
|
|
generic-y += irq_regs.h
|
|
|
|
generic-y += irq_work.h
|
|
|
|
generic-y += kdebug.h
|
|
|
|
generic-y += kmap_types.h
|
|
|
|
generic-y += kprobes.h
|
|
|
|
generic-y += kvm_para.h
|
|
|
|
generic-y += local.h
|
nds32: Perf porting
This is the commit that porting the perf for nds32.
1.Raw event:
The raw events start with 'r'.
Usage:
perf stat -e rXYZ ./app
X: the index of performance counter.
YZ: the index(convert to hexdecimal) of events
Example:
'perf stat -e r101 ./app' means the counter 1 will count the instruction
event.
The index of counter and events can be found in
"Andes System Privilege Architecture Version 3 Manual".
Or you can perform the 'perf list' to find the symbolic name of raw events.
2.Perf mmap2:
Fix unexpected perf mmap2() page fault
When the mmap2() called by perf application,
you will encounter such condition:"failed to write."
With return value -EFAULT
This is due to the page fault caused by "reading" buffer
from the mapped legal address region to write to the descriptor.
The page_fault handler will get a VM_FAULT_SIGBUS return value,
which should not happens here.(Due to this is a read request.)
You can refer to kernel/events/core.c:perf_mmap_fault(...)
If "(vmf->pgoff && (vmf->flags & FAULT_FLAG_WRITE))" is evaluated
as true, you will get VM_FAULT_SIGBUS as return value.
However, this is not an write request. The flags which indicated
why the page fault happens is wrong.
Furthermore, NDS32 SPAv3 is not able to detect it is read or write.
It only know either it is instruction fetch or data access.
Therefore, by removing the wrong flag assignment(actually, the hardware
is not able to show the reason), we can fix this bug.
3.Perf multiple events map to same counter.
When there are multiple events map to the same counter, the counter
counts inaccurately. This is because each counter only counts one event
in the same time.
So when there are multiple events map to same counter, they have to take
turns in each context.
There are two solution:
1. Print the error message when multiple events map to the same counter.
But print the error message would let the program hang in loop. The ltp
(linux test program) would be failed when the program hang in loop.
2. Don't print the error message, the ltp would pass. But the user need to
have the knowledge that don't count the events which map to the same
counter, or the user will get the inaccurate results.
We choose method 2 for the solution
Signed-off-by: Nickhu <nickhu@andestech.com>
Acked-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
2018-10-25 10:24:15 +08:00
|
|
|
generic-y += local64.h
|
2017-10-25 15:03:49 +08:00
|
|
|
generic-y += mm-arch-hooks.h
|
2019-02-22 20:49:41 +08:00
|
|
|
generic-y += mmiowb.h
|
2017-10-25 15:03:49 +08:00
|
|
|
generic-y += parport.h
|
|
|
|
generic-y += pci.h
|
|
|
|
generic-y += percpu.h
|
|
|
|
generic-y += preempt.h
|
|
|
|
generic-y += sections.h
|
|
|
|
generic-y += serial.h
|
|
|
|
generic-y += switch_to.h
|
|
|
|
generic-y += timex.h
|
|
|
|
generic-y += topology.h
|
|
|
|
generic-y += trace_clock.h
|
2018-04-19 11:27:59 +08:00
|
|
|
generic-y += xor.h
|
2017-10-25 15:03:49 +08:00
|
|
|
generic-y += unaligned.h
|
|
|
|
generic-y += user.h
|
|
|
|
generic-y += vga.h
|
|
|
|
generic-y += word-at-a-time.h
|