Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ceed97ab
Commit
ceed97ab
authored
Oct 02, 2014
by
Vineet Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARC: perf: Enable generic software events
Signed-off-by:
Vineet Gupta
<
vgupta@synopsys.com
>
parent
3a51d50f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
arch/arc/kernel/unaligned.c
arch/arc/kernel/unaligned.c
+2
-0
arch/arc/mm/fault.c
arch/arc/mm/fault.c
+10
-2
No files found.
arch/arc/kernel/unaligned.c
View file @
ceed97ab
...
...
@@ -12,6 +12,7 @@
*/
#include <linux/types.h>
#include <linux/perf_event.h>
#include <linux/ptrace.h>
#include <linux/uaccess.h>
#include <asm/disasm.h>
...
...
@@ -253,6 +254,7 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs,
}
}
perf_sw_event
(
PERF_COUNT_SW_ALIGNMENT_FAULTS
,
1
,
regs
,
address
);
return
0
;
fault:
...
...
arch/arc/mm/fault.c
View file @
ceed97ab
...
...
@@ -14,6 +14,7 @@
#include <linux/ptrace.h>
#include <linux/uaccess.h>
#include <linux/kdebug.h>
#include <linux/perf_event.h>
#include <asm/pgalloc.h>
#include <asm/mmu.h>
...
...
@@ -139,13 +140,20 @@ void do_page_fault(unsigned long address, struct pt_regs *regs)
return
;
}
perf_sw_event
(
PERF_COUNT_SW_PAGE_FAULTS
,
1
,
regs
,
address
);
if
(
likely
(
!
(
fault
&
VM_FAULT_ERROR
)))
{
if
(
flags
&
FAULT_FLAG_ALLOW_RETRY
)
{
/* To avoid updating stats twice for retry case */
if
(
fault
&
VM_FAULT_MAJOR
)
if
(
fault
&
VM_FAULT_MAJOR
)
{
tsk
->
maj_flt
++
;
else
perf_sw_event
(
PERF_COUNT_SW_PAGE_FAULTS_MAJ
,
1
,
regs
,
address
);
}
else
{
tsk
->
min_flt
++
;
perf_sw_event
(
PERF_COUNT_SW_PAGE_FAULTS_MIN
,
1
,
regs
,
address
);
}
if
(
fault
&
VM_FAULT_RETRY
)
{
flags
&=
~
FAULT_FLAG_ALLOW_RETRY
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment