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
fed4c9c6
Commit
fed4c9c6
authored
Nov 13, 2019
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by:
Ingo Molnar
<
mingo@kernel.org
>
parents
56b2147f
d00dbd29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
kernel/events/core.c
kernel/events/core.c
+19
-4
No files found.
kernel/events/core.c
View file @
fed4c9c6
...
...
@@ -1031,7 +1031,7 @@ perf_cgroup_set_timestamp(struct task_struct *task,
{
}
void
static
inline
void
perf_cgroup_switch
(
struct
task_struct
*
task
,
struct
task_struct
*
next
)
{
}
...
...
@@ -10609,6 +10609,15 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
goto
err_ns
;
}
/*
* Disallow uncore-cgroup events, they don't make sense as the cgroup will
* be different on other CPUs in the uncore mask.
*/
if
(
pmu
->
task_ctx_nr
==
perf_invalid_context
&&
cgroup_fd
!=
-
1
)
{
err
=
-
EINVAL
;
goto
err_pmu
;
}
if
(
event
->
attr
.
aux_output
&&
!
(
pmu
->
capabilities
&
PERF_PMU_CAP_AUX_OUTPUT
))
{
err
=
-
EOPNOTSUPP
;
...
...
@@ -11416,8 +11425,11 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
int
err
;
/*
* Get the target context (task or percpu):
* Grouping is not supported for kernel events, neither is 'AUX',
* make sure the caller's intentions are adjusted.
*/
if
(
attr
->
aux_output
)
return
ERR_PTR
(
-
EINVAL
);
event
=
perf_event_alloc
(
attr
,
cpu
,
task
,
NULL
,
NULL
,
overflow_handler
,
context
,
-
1
);
...
...
@@ -11429,6 +11441,9 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
/* Mark owner so we could distinguish it from user events. */
event
->
owner
=
TASK_TOMBSTONE
;
/*
* Get the target context (task or percpu):
*/
ctx
=
find_get_context
(
event
->
pmu
,
task
,
event
);
if
(
IS_ERR
(
ctx
))
{
err
=
PTR_ERR
(
ctx
);
...
...
@@ -11880,7 +11895,7 @@ inherit_event(struct perf_event *parent_event,
GFP_KERNEL
);
if
(
!
child_ctx
->
task_ctx_data
)
{
free_event
(
child_event
);
return
NULL
;
return
ERR_PTR
(
-
ENOMEM
)
;
}
}
...
...
@@ -11983,7 +11998,7 @@ static int inherit_group(struct perf_event *parent_event,
if
(
IS_ERR
(
child_ctr
))
return
PTR_ERR
(
child_ctr
);
if
(
sub
->
aux_event
==
parent_event
&&
if
(
sub
->
aux_event
==
parent_event
&&
child_ctr
&&
!
perf_get_aux_event
(
child_ctr
,
leader
))
return
-
EINVAL
;
}
...
...
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