Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kernel Program Behaviour Models
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
felixkhals
Kernel Program Behaviour Models
Commits
a61ffc11
Commit
a61ffc11
authored
6 years ago
by
meto
Browse files
Options
Downloads
Patches
Plain Diff
fixes
parent
62799805
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
kernel/sched/pb.c
+2
-4
2 additions, 4 deletions
kernel/sched/pb.c
kernel/sched/perf_error_detection.c
+1
-1
1 addition, 1 deletion
kernel/sched/perf_error_detection.c
with
3 additions
and
5 deletions
kernel/sched/pb.c
+
2
−
4
View file @
a61ffc11
...
@@ -115,8 +115,6 @@ static struct task_struct * pick_next_task_pb(struct rq *rq,
...
@@ -115,8 +115,6 @@ static struct task_struct * pick_next_task_pb(struct rq *rq,
next_mode
=
determine_next_mode_pb
(
rq
);
next_mode
=
determine_next_mode_pb
(
rq
);
pb
->
mode
=
next_mode
;
pb
->
mode
=
next_mode
;
int
perf_init_res
;
// The mode does not change --> no behavior change is needed
// The mode does not change --> no behavior change is needed
if
(
next_mode
==
PB_EXEC_MODE
)
if
(
next_mode
==
PB_EXEC_MODE
)
{
{
...
@@ -131,7 +129,7 @@ static struct task_struct * pick_next_task_pb(struct rq *rq,
...
@@ -131,7 +129,7 @@ static struct task_struct * pick_next_task_pb(struct rq *rq,
printk
(
KERN_DEBUG
"PLAN DONE
\n
"
);
printk
(
KERN_DEBUG
"PLAN DONE
\n
"
);
pb
->
mode
=
PB_DISABLED_MODE
;
pb
->
mode
=
PB_DISABLED_MODE
;
}
else
{
}
else
{
perf_init_res
=
init_perf_event
(
pb
->
plan
[
pb
->
c_entry
],
&
pb
->
pevent
);
int
perf_init_res
=
init_perf_event
(
pb
->
plan
[
pb
->
c_entry
],
&
pb
->
pevent
);
if
(
perf_init_res
<
0
){
if
(
perf_init_res
<
0
){
//initialization error detection/handling could happen here
//initialization error detection/handling could happen here
printk
(
KERN_WARNING
"PB EXEC,START,%u,%llu: FAILED OPEN PERF EVENT
\n
"
,
pb
->
c_entry
,
sched_clock
());
printk
(
KERN_WARNING
"PB EXEC,START,%u,%llu: FAILED OPEN PERF EVENT
\n
"
,
pb
->
c_entry
,
sched_clock
());
...
@@ -143,7 +141,7 @@ static struct task_struct * pick_next_task_pb(struct rq *rq,
...
@@ -143,7 +141,7 @@ static struct task_struct * pick_next_task_pb(struct rq *rq,
}
else
if
(
current_mode
==
PB_ADMIN_MODE
){
}
else
if
(
current_mode
==
PB_ADMIN_MODE
){
printk
(
KERN_DEBUG
"PB ADMIN,STOP,%u,%llu
\n
"
,
pb
->
c_entry
,
sched_clock
());
printk
(
KERN_DEBUG
"PB ADMIN,STOP,%u,%llu
\n
"
,
pb
->
c_entry
,
sched_clock
());
}
else
{
}
else
{
perf_init_res
=
init_perf_event
(
pb
->
plan
[
pb
->
c_entry
],
&
pb
->
pevent
);
int
perf_init_res
=
init_perf_event
(
pb
->
plan
[
pb
->
c_entry
],
&
pb
->
pevent
);
if
(
perf_init_res
<
0
){
if
(
perf_init_res
<
0
){
//initialization error detection/handling could happen here
//initialization error detection/handling could happen here
...
...
This diff is collapsed.
Click to expand it.
kernel/sched/perf_error_detection.c
+
1
−
1
View file @
a61ffc11
...
@@ -22,7 +22,7 @@ int init_perf_event(struct plan_entry plan_entry, struct perf_event **pevent){
...
@@ -22,7 +22,7 @@ int init_perf_event(struct plan_entry plan_entry, struct perf_event **pevent){
// cpu = -1 -> cpu indepented (assumed to be regulated by plan)
// cpu = -1 -> cpu indepented (assumed to be regulated by plan)
*
pevent
=
perf_event_create
(
&
pe
,
smp_processor_id
());
*
pevent
=
perf_event_create
(
&
pe
,
smp_processor_id
());
if
(
IS_ERR
(
event
))
{
if
(
IS_ERR
(
p
event
))
{
printk
(
KERN_WARNING
"PB ERROR INITIALISING PERF EVENT
\n
"
);
printk
(
KERN_WARNING
"PB ERROR INITIALISING PERF EVENT
\n
"
);
return
-
1
;
return
-
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment