Repository navigation
Commit c6567f6
hw-breakpoints: Improve in-kernel event creation error granularity
In fail case, perf_event_create_kernel_counter() returns NULL
instead of an error, which doesn't help us to inform the user
about the origin of the problem from the outer most callers.
Often we can just return -EINVAL, which doesn't help anyone when
it's eventually about a memory allocation failure.
Then, this patch makes perf_event_create_kernel_counter() always
return a detailed error code.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Prasad <prasad@linux.vnet.ibm.com>
LKML-Reference: <1259210142-5714-2-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>1 parent d99be40 commit c6567f6
1 file changed
Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4780 | 4780 | | |
4781 | 4781 | | |
4782 | 4782 | | |
4783 | | - | |
4784 | | - | |
| 4783 | + | |
| 4784 | + | |
| 4785 | + | |
| 4786 | + | |
4785 | 4787 | | |
4786 | 4788 | | |
4787 | 4789 | | |
4788 | | - | |
4789 | | - | |
| 4790 | + | |
| 4791 | + | |
4790 | 4792 | | |
| 4793 | + | |
4791 | 4794 | | |
4792 | 4795 | | |
4793 | 4796 | | |
| |||
4804 | 4807 | | |
4805 | 4808 | | |
4806 | 4809 | | |
4807 | | - | |
4808 | | - | |
4809 | | - | |
4810 | | - | |
4811 | | - | |
| 4810 | + | |
| 4811 | + | |
| 4812 | + | |
| 4813 | + | |
4812 | 4814 | | |
4813 | 4815 | | |
4814 | 4816 | | |
| |||
0 commit comments