- Jul 21, 2011
-
-
Will Deacon authored
In commit a8b0ca17 ("perf: Remove the nmi parameter from the swevent and overflow interface") one site was overlooked. Signed-off-by:
Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/20110708173442.GB31972@e102144-lin.cambridge.arm.com Signed-off-by:
Ingo Molnar <mingo@elte.hu>
-
- Jul 01, 2011
-
-
Avi Kivity authored
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 <avi@redhat.com> Signed-off-by:
Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1309362157-6596-2-git-send-email-avi@redhat.com Signed-off-by:
Ingo Molnar <mingo@elte.hu>
-
- Oct 15, 2010
-
-
Robert Richter authored
Make !CONFIG_PM function stubs static inline and remove section attribute. Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
Anand Gadiyar authored
Commit e9677b3c (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 1 LD .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 1 Signed-off-by:
Anand Gadiyar <gadiyar@ti.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
Anand Gadiyar authored
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 <gadiyar@ti.com> Cc: Matt Fleming <matt@console-pimps.org> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
- Oct 11, 2010
-
-
Robert Richter authored
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 <will.deacon@arm.com> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
Robert Richter authored
This patch simplifies op_create_counter(). Removing if/else if paths and return code variable by direct returning from function. Acked-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
Robert Richter authored
This patch removes some unnecessary goto statements. Acked-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
Robert Richter authored
This patch fixes a resource leak on failure, where the oprofilefs and some counters may not released properly. Signed-off-by:
Robert Richter <robert.richter@amd.com> Acked-by:
Will Deacon <will.deacon@arm.com> Cc: linux-arm-kernel@lists.infradead.org Cc: <stable@kernel.org> # .35.x LKML-Reference: <20100929145225.GJ13563@erda.amd.com> Signed-off-by:
Ingo Molnar <mingo@elte.hu>
-
Matt Fleming authored
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 <matt@console-pimps.org> Tested-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
Matt Fleming authored
In preparation for moving the majority of this oprofile code into an architecture-neutral place separate the architecture-independent code into oprofile_perf_init() and oprofile_perf_exit(). Signed-off-by:
Matt Fleming <matt@console-pimps.org> Tested-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
Matt Fleming authored
In preparation for moving the generic functions out of this file, give the functions more general names (e.g. remove "arm" from the names). Signed-off-by:
Matt Fleming <matt@console-pimps.org> Tested-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
Matt Fleming authored
Make op_name_from_perf_id() global so that we have a way for each architecture to construct an oprofile name for op->cpu_type. We need to remove the argument from the function prototype so that we can hide all implementation details inside the function. Signed-off-by:
Matt Fleming <matt@console-pimps.org> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
Matt Fleming authored
The number of counters for the registered pmu is needed in a few places so provide a helper function that returns this number. Signed-off-by:
Matt Fleming <matt@console-pimps.org> Tested-by:
Will Deacon <will.deacon@arm.com> Acked-by:
Paul Mundt <lethal@linux-sh.org> Acked-by:
Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
- Oct 04, 2010
-
-
Robert Richter authored
This patch removes some unnecessary goto statements. Acked-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
Robert Richter authored
This patch simplifies op_create_counter(). Removing if/else if paths and return code variable by direct returning from function. Acked-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
Robert Richter authored
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 <will.deacon@arm.com> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
- Sep 30, 2010
-
-
Robert Richter authored
This patch fixes a resource leak on failure, where the oprofilefs and some counters may not released properly. Signed-off-by:
Robert Richter <robert.richter@amd.com> Acked-by:
Will Deacon <will.deacon@arm.com> Cc: linux-arm-kernel@lists.infradead.org Cc: <stable@kernel.org> # .35.x LKML-Reference: <20100929145225.GJ13563@erda.amd.com> Signed-off-by:
Ingo Molnar <mingo@elte.hu>
-
- Sep 15, 2010
-
-
Matt Helsley authored
The kernel perf event creation path shouldn't use find_task_by_vpid() because a vpid exists in a specific namespace. find_task_by_vpid() uses current's pid namespace which isn't always the correct namespace to use for the vpid in all the places perf_event_create_kernel_counter() (and thus find_get_context()) is called. The goal is to clean up pid namespace handling and prevent bugs like: https://bugzilla.kernel.org/show_bug.cgi?id=17281 Instead of using pids switch find_get_context() to use task struct pointers directly. The syscall is responsible for resolving the pid to a task struct. This moves the pid namespace resolution into the syscall much like every other syscall that takes pid parameters. Signed-off-by:
Matt Helsley <matthltc@us.ibm.com> Signed-off-by:
Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Robin Green <greenrd@greenrd.org> Cc: Prasad <prasad@linux.vnet.ibm.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Will Deacon <will.deacon@arm.com> Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> LKML-Reference: <a134e5e392ab0204961fd1a62c84a222bf5874a9.1284407763.git.matthltc@us.ibm.com> Signed-off-by:
Ingo Molnar <mingo@elte.hu>
-
- Aug 31, 2010
-
-
Robert Richter authored
The pointers must be NULL'ed to avoid double-freeing the pointers in rare cases during reinitialization. Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
Will Deacon authored
Now that oprofile_arch_exit is only called when the OProfile module is unloaded, it can assume that init completed successfully and not have to worry about double frees or releasing NULL perf events. This patch ensures that oprofile_arch_init fails gracefully on ARM and simplifies the exit code based on the above. Cc: Robert Richter <robert.richter@amd.com> Cc: Matt Fleming <matt@console-pimps.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Robert Richter <robert.richter@amd.com>
-
- May 17, 2010
-
-
Will Deacon authored
This is a reworking of an original patch posted by Aaro Koskinen: oprofile does not work with PM, because sysdev_suspend() is done with interrupts disabled and oprofile needs a mutex. Implementing oprofile as a platform device solves this problem. Cc: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Will Deacon authored
There are currently two hardware performance monitoring subsystems in the kernel for ARM: OProfile and perf-events. This creates the following problems: 1.) Duplicate PMU accessor code. Inevitable code drift may lead to bugs in one framework that are fixed in the other. 2.) Locking issues. OProfile doesn't reprogram hardware counters between profiling runs if the events to be monitored have not been changed. This means that other profiling frameworks cannot use the counters if OProfile is in use. 3.) Due to differences in the two frameworks, it may not be possible to compare the results obtained by OProfile with those obtained by perf. This patch removes the OProfile PMU driver code and replaces it with calls to perf, therefore solving the issues mentioned above. The only userspace-visible change is the lack of SCU counter support for 11MPCore. This is currently unsupported by OProfile userspace tools anyway and therefore shouldn't cause any problems. Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Robert Richter <robert.richter@amd.com> Cc: Jamie Iles <jamie.iles@picochip.com> Cc: Jean Pihet <jpihet@mvista.com> Signed-off-by:
Will Deacon <will.deacon@arm.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- Sep 01, 2008
-
-
Jean PIHET authored
Add Oprofile kernel support for ARMv7. Tested on OMAP3430 and OMAP3530 chipsets (Cortex-A8). Signed-off-by:
Jean Pihet <jpihet@mvista.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- Jan 24, 2008
-
-
Kay Sievers authored
All kobjects require a dynamically allocated name now. We no longer need to keep track if the name is statically assigned, we can just unconditionally free() all kobject names on cleanup. Signed-off-by:
Kay Sievers <kay.sievers@vrfy.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- Mar 02, 2007
-
-
Richard Purdie authored
Always allow backtrace when using oprofile on ARM, even if a PMU isn't present. Signed-off-by:
Richard Purdie <rpurdie@rpsys.net> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- Feb 06, 2007
-
-
Russell King authored
Add the glue for ARM11 SMP oprofile support, which also supports the performance monitor in the coherency unit. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
Add oprofile glue for ARM11 (ARMv6) oprofile support. This connects the ARM11 core profiling support to the oprofile code for uniprocessor configurations. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- Mar 21, 2006
-
-
Russell King authored
We need this to be zero initialised. Since this is an array, use kcalloc rather than kzalloc or kmalloc. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
op_arm_sem is being used as a mutex, so convert it to use real mutexes. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- Feb 01, 2006
-
-
Russ Dill authored
Patch from Russ Dill The oprofile init code was broken in commit c6b9da. The new logic will always return -ENODEV. This fixes oprofile_arch_init to return 0 on success, and return the return value of spec->init() if applicable. Signed-off-by:
Russ Dill <Russ.Dill@gmail.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- Oct 28, 2005
-
-
Russell King authored
There is nothing special about having the init code separate from the common code, so combine the two. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
The common oprofile code assumes the name "PMU" (from Intel's performance management unit). This is misleading when we start adding oprofile support for other machine types which don't use the same terminology. Call it op_arm_* instead of pmu_*. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
The oprofile suspend/resume was missing locking. If we failed to start oprofile on resume, we still reported that it was enabled. Instead, disable oprofile on error. Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Russell King authored
Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- Apr 16, 2005
-
-
Linus Torvalds authored
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
-