04 Sep, 2013
3 commits
-
same story as with oprofilefs_mkdir()
Signed-off-by: Al Viro
-
it's always equal to ->d_sb of the second argument (parent dentry),
due to either being literally that, or ->d_sb of parent's parent.Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
22 Jun, 2012
1 commit
-
This changes oprofile_perf.c to use the per-cpu framework.
Using the per-cpu framework should avoid error like the following:
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:28:28: error: variably modified 'perf_events' at file scope
Reported-by: William Cohen
Cc: Will Deacon
Signed-off-by: Robert Richter
21 Jun, 2012
1 commit
-
The OProfile perf backend uses a static array to keep track of the
perf events on the system. When compiling with CONFIG_CPUMASK_OFFSTACK=y
&& SMP, nr_cpumask_bits is not a compile-time constant and the build
will fail with:oprofile_perf.c:28: error: variably modified 'perf_events' at file scope
This patch uses NR_CPUs instead of nr_cpumask_bits for the array
initialisation. If this causes space problems in the future, we can
always move to dynamic allocation for the events array.Cc: Matt Fleming
Reported-by: Russell King - ARM Linux
Signed-off-by: Will Deacon
Cc: # v2.6.37+
Signed-off-by: Robert Richter
13 Sep, 2011
1 commit
-
The oprofilefs_lock can be taken in atomic context (in profiling
interrupts) and therefore cannot cannot be preempted on -rt -
annotate it.In mainline this change documents the low level nature of
the lock - otherwise there's no functional difference. Lockdep
and Sparse checking will work as usual.Signed-off-by: Thomas Gleixner
Signed-off-by: Ingo Molnar
22 Jul, 2011
1 commit
-
In commit a8b0ca17b80e ("perf: Remove the nmi parameter from the
swevent and overflow interface") one site was overlooked.Signed-off-by: Peter Zijlstra
Link: http://lkml.kernel.org/r/20110708173442.GB31972@e102144-lin.cambridge.arm.com
Signed-off-by: Ingo Molnar
01 Jul, 2011
1 commit
-
The perf_event overflow handler does not receive any caller-derived
argument, so many callers need to resort to looking up the perf_event
in their local data structure. This is ugly and doesn't scale if a
single callback services many perf_events.Fix by adding a context parameter to perf_event_create_kernel_counter()
(and derived hardware breakpoints APIs) and storing it in the perf_event.
The field can be accessed from the callback as event->overflow_handler_context.
All callers are updated.Signed-off-by: Avi Kivity
Signed-off-by: Peter Zijlstra
Link: http://lkml.kernel.org/r/1309362157-6596-2-git-send-email-avi@redhat.com
Signed-off-by: Ingo Molnar
15 Oct, 2010
4 commits
-
Make !CONFIG_PM function stubs static inline and remove section
attribute.Signed-off-by: Robert Richter
-
Commit e9677b3ce (oprofile, ARM: Use oprofile_arch_exit() to
cleanup on failure) caused oprofile_perf_exit to be called
in the cleanup path of oprofile_perf_init. The __exit tag
for oprofile_perf_exit should therefore be dropped.The same has to be done for exit_driverfs as well, as this
function is called from oprofile_perf_exit. Else, we get
the following two linker errors.LD .tmp_vmlinux1
`oprofile_perf_exit' referenced in section `.init.text' of arch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/arm/oprofile/built-in.o
make: *** [.tmp_vmlinux1] Error 1LD .tmp_vmlinux1
`exit_driverfs' referenced in section `.text' of arch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/arm/oprofile/built-in.o
make: *** [.tmp_vmlinux1] Error 1Signed-off-by: Anand Gadiyar
Cc: Will Deacon
Signed-off-by: Robert Richter -
oprofile_perf.c needs to include platform_device.h
Otherwise we get the following build break.CC arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.o
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:192: warning: 'struct platform_device' declared inside parameter list
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:192: warning: its scope is only this definition or declaration, which is probably not what you want
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:201: warning: 'struct platform_device' declared inside parameter list
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:210: error: variable 'oprofile_driver' has initializer but incomplete type
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:211: error: unknown field 'driver' specified in initializer
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:211: error: extra brace group at end of initializer
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:211: error: (near initialization for 'oprofile_driver')
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:213: warning: excess elements in struct initializer
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:213: warning: (near initialization for 'oprofile_driver')
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:214: error: unknown field 'resume' specified in initializer
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:214: warning: excess elements in struct initializer
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:214: warning: (near initialization for 'oprofile_driver')
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:215: error: unknown field 'suspend' specified in initializer
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:215: warning: excess elements in struct initializer
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c:215: warning: (near initialization for 'oprofile_driver')
arch/arm/oprofile/../../../drivers/oprofile/oprofile_perf.c: In function 'init_driverfs':Signed-off-by: Anand Gadiyar
Cc: Matt Fleming
Cc: Will Deacon
Signed-off-by: Robert Richter -
Conflicts:
arch/arm/oprofile/common.c
kernel/perf_event.c
12 Oct, 2010
4 commits
-
There is duplicate cleanup code in the init and exit functions. Now,
oprofile_arch_exit() is also used if oprofile_arch_init() fails.Acked-by: Will Deacon
Signed-off-by: Robert Richter -
This patch simplifies op_create_counter(). Removing if/else if paths
and return code variable by direct returning from function.Acked-by: Will Deacon
Signed-off-by: Robert Richter -
This patch removes some unnecessary goto statements.
Acked-by: Will Deacon
Signed-off-by: Robert Richter -
This patch fixes a resource leak on failure, where the
oprofilefs and some counters may not released properly.Signed-off-by: Robert Richter
Acked-by: Will Deacon
Cc: linux-arm-kernel@lists.infradead.org
Cc: # .35.x
LKML-Reference:
Signed-off-by: Ingo Molnar
11 Oct, 2010
1 commit
-
Move the perf-events backend from arch/arm/oprofile into
drivers/oprofile so that the code can be shared between architectures.This allows each architecture to maintain only a single copy of the PMU
accessor functions instead of one for both perf and OProfile. It also
becomes possible for other architectures to delete much of their
OProfile code in favour of the common code now available in
drivers/oprofile/oprofile_perf.c.Signed-off-by: Matt Fleming
Tested-by: Will Deacon
Signed-off-by: Robert Richter