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
nexedi
linux
Commits
a377062a
Commit
a377062a
authored
Feb 18, 2003
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[OPROF] Fix arguments to oprofile_add_sample.
parent
8007f78e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
22 deletions
+27
-22
arch/alpha/oprofile/op_model_ev4.c
arch/alpha/oprofile/op_model_ev4.c
+2
-1
arch/alpha/oprofile/op_model_ev5.c
arch/alpha/oprofile/op_model_ev5.c
+4
-3
arch/alpha/oprofile/op_model_ev6.c
arch/alpha/oprofile/op_model_ev6.c
+3
-2
arch/alpha/oprofile/op_model_ev67.c
arch/alpha/oprofile/op_model_ev67.c
+18
-16
No files found.
arch/alpha/oprofile/op_model_ev4.c
View file @
a377062a
...
...
@@ -101,7 +101,8 @@ ev4_handle_interrupt(unsigned long which, struct pt_regs *regs,
return
;
/* Record the sample. */
oprofile_add_sample
(
regs
->
pc
,
which
,
smp_processor_id
());
oprofile_add_sample
(
regs
->
pc
,
!
user_mode
(
regs
),
which
,
smp_processor_id
());
}
...
...
arch/alpha/oprofile/op_model_ev5.c
View file @
a377062a
...
...
@@ -186,7 +186,8 @@ ev5_handle_interrupt(unsigned long which, struct pt_regs *regs,
struct
op_counter_config
*
ctr
)
{
/* Record the sample. */
oprofile_add_sample
(
regs
->
pc
,
which
,
smp_processor_id
());
oprofile_add_sample
(
regs
->
pc
,
!
user_mode
(
regs
),
which
,
smp_processor_id
());
}
...
...
@@ -195,7 +196,7 @@ struct op_axp_model op_model_ev5 = {
.
cpu_setup
=
ev5_cpu_setup
,
.
reset_ctr
=
ev5_reset_ctr
,
.
handle_interrupt
=
ev5_handle_interrupt
,
.
cpu
=
"alpha/ev5"
,
.
cpu
_type
=
"alpha/ev5"
,
.
num_counters
=
3
,
.
can_set_proc_mode
=
1
,
};
...
...
@@ -205,7 +206,7 @@ struct op_axp_model op_model_pca56 = {
.
cpu_setup
=
ev5_cpu_setup
,
.
reset_ctr
=
ev5_reset_ctr
,
.
handle_interrupt
=
ev5_handle_interrupt
,
.
cpu
=
"alpha/pca56"
,
.
cpu
_type
=
"alpha/pca56"
,
.
num_counters
=
3
,
.
can_set_proc_mode
=
1
,
};
arch/alpha/oprofile/op_model_ev6.c
View file @
a377062a
...
...
@@ -88,7 +88,8 @@ ev6_handle_interrupt(unsigned long which, struct pt_regs *regs,
struct
op_counter_config
*
ctr
)
{
/* Record the sample. */
oprofile_add_sample
(
regs
->
pc
,
which
,
smp_processor_id
());
oprofile_add_sample
(
regs
->
pc
,
!
user_mode
(
regs
),
which
,
smp_processor_id
());
}
...
...
@@ -97,7 +98,7 @@ struct op_axp_model op_model_ev6 = {
.
cpu_setup
=
ev6_cpu_setup
,
.
reset_ctr
=
ev6_reset_ctr
,
.
handle_interrupt
=
ev6_handle_interrupt
,
.
cpu
=
"alpha/ev6"
,
.
cpu
_type
=
"alpha/ev6"
,
.
num_counters
=
2
,
.
can_set_proc_mode
=
0
,
};
arch/alpha/oprofile/op_model_ev67.c
View file @
a377062a
...
...
@@ -130,15 +130,16 @@ enum profileme_counters {
PM_NUM_COUNTERS
};
static
void
op_add_pm
(
unsigned
long
pc
,
unsigned
long
counter
,
static
inline
void
op_add_pm
(
unsigned
long
pc
,
int
kern
,
unsigned
long
counter
,
struct
op_counter_config
*
ctr
,
unsigned
long
event
)
{
unsigned
long
fake_counter
=
2
+
event
;
if
(
counter
==
1
)
fake_counter
+=
PM_NUM_COUNTERS
;
if
(
ctr
[
fake_counter
].
enabled
)
oprofile_add_sample
(
pc
,
fake_counter
,
smp_processor_id
());
oprofile_add_sample
(
pc
,
kern
,
fake_counter
,
smp_processor_id
());
}
static
void
...
...
@@ -146,6 +147,7 @@ ev67_handle_interrupt(unsigned long which, struct pt_regs *regs,
struct
op_counter_config
*
ctr
)
{
unsigned
long
pmpc
,
pctr_ctl
;
int
kern
=
!
user_mode
(
regs
);
int
mispredict
=
0
;
union
{
unsigned
long
v
;
...
...
@@ -195,27 +197,27 @@ ev67_handle_interrupt(unsigned long which, struct pt_regs *regs,
to PALcode. Recognize ITB miss by PALcode
offset address, and get actual PC from
EXC_ADDR. */
oprofile_add_sample
(
regs
->
pc
,
which
,
oprofile_add_sample
(
regs
->
pc
,
kern
,
which
,
smp_processor_id
());
if
((
pmpc
&
((
1
<<
15
)
-
1
))
==
581
)
op_add_pm
(
regs
->
pc
,
which
,
ctr
,
PM_ITB_MISS
);
op_add_pm
(
regs
->
pc
,
kern
,
which
,
ctr
,
PM_ITB_MISS
);
/* Most other bit and counter values will be
those for the first instruction in the
fault handler, so we're done. */
return
;
case
TRAP_REPLAY
:
if
(
i_stat
.
fields
.
load_store
)
op_add_pm
(
pmpc
,
which
,
ctr
,
PM_LOAD_STORE
);
else
op_add_pm
(
pmpc
,
which
,
ctr
,
PM_REPLAY
);
op_add_pm
(
pmpc
,
kern
,
which
,
ctr
,
(
i_stat
.
fields
.
load_store
?
PM_LOAD_STORE
:
PM_REPLAY
));
break
;
case
TRAP_DTB_DOUBLE_MISS_3
:
case
TRAP_DTB_DOUBLE_MISS_4
:
case
TRAP_DTB_SINGLE_MISS
:
op_add_pm
(
pmpc
,
which
,
ctr
,
PM_DTB_MISS
);
op_add_pm
(
pmpc
,
kern
,
which
,
ctr
,
PM_DTB_MISS
);
break
;
case
TRAP_UNALIGNED
:
op_add_pm
(
pmpc
,
which
,
ctr
,
PM_UNALIGNED
);
op_add_pm
(
pmpc
,
kern
,
which
,
ctr
,
PM_UNALIGNED
);
break
;
case
TRAP_INVALID0
:
case
TRAP_FP_DISABLED
:
...
...
@@ -235,21 +237,21 @@ ev67_handle_interrupt(unsigned long which, struct pt_regs *regs,
set. */
if
(
i_stat
.
fields
.
mispredict
)
{
mispredict
=
1
;
op_add_pm
(
pmpc
,
which
,
ctr
,
PM_MISPREDICT
);
op_add_pm
(
pmpc
,
kern
,
which
,
ctr
,
PM_MISPREDICT
);
}
}
oprofile_add_sample
(
pmpc
,
which
,
smp_processor_id
());
oprofile_add_sample
(
pmpc
,
kern
,
which
,
smp_processor_id
());
pctr_ctl
=
wrperfmon
(
5
,
0
);
if
(
pctr_ctl
&
(
1UL
<<
27
))
op_add_pm
(
pmpc
,
which
,
ctr
,
PM_STALLED
);
op_add_pm
(
pmpc
,
kern
,
which
,
ctr
,
PM_STALLED
);
/* Unfortunately, TAK is undefined on mispredicted branches.
??? It is also undefined for non-cbranch insns, should
check that. */
if
(
!
mispredict
&&
pctr_ctl
&
(
1UL
<<
0
))
op_add_pm
(
pmpc
,
which
,
ctr
,
PM_TAKEN
);
op_add_pm
(
pmpc
,
kern
,
which
,
ctr
,
PM_TAKEN
);
}
struct
op_axp_model
op_model_ev67
=
{
...
...
@@ -257,7 +259,7 @@ struct op_axp_model op_model_ev67 = {
.
cpu_setup
=
ev67_cpu_setup
,
.
reset_ctr
=
ev67_reset_ctr
,
.
handle_interrupt
=
ev67_handle_interrupt
,
.
cpu
=
"alpha/ev67"
,
.
cpu
_type
=
"alpha/ev67"
,
.
num_counters
=
20
,
.
can_set_proc_mode
=
0
,
};
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