summaryrefslogtreecommitdiffstats
path: root/runtime/perf.c
Commit message (Collapse)AuthorAgeFilesLines
* Create one perf structure to rule them allJosh Stone2010-03-181-46/+21
| | | | | | | | | | * perf.h (stap_perf_probe): Define one structure for all our needs. * perf.c (_stp_perf_init): Use the new struct, return errors directly. (_stp_perf_exit): Use the new struct. * tapset-perfmon.cxx (perf_derived_probe_group::emit_module_decls): Use the stap_perf_probe definition from perf.h now. (perf_derived_probe_group::emit_module_init): Adapt. (perf_derived_probe_group::emit_module_exit): Adapt.
* PR909: filter out offline cpus from perfctr registration loopFrank Ch. Eigler2010-03-171-0/+5
| | | | * runtime/perf.c (_stp_perf_init): If cpu_is_offline(), don't.
* Preserve perf initialization errorsJosh Stone2010-03-171-3/+7
| | | | | | | * runtime/perf.c (_stp_perf_init): Pass through ERR_PTRs, and create our own -ENOMEM for allocation failures. * tapset-perfmon.cxx (perf_derived_probe_group::emit_module_init): Check IS_ERR for registration status.
* Modify the systemtap perf sampling internal apiWill Cohen2010-03-171-11/+17
| | | | | | The only information available in the overflow interrupt is the event. Need to group other pieces of information needed by systemtap, so they can be found based on the the location of the event information.
* PR909: Runtime for Performance Event SamplingWill Cohen2010-03-171-102/+58
| | | | | | | | | | | | | | Implements a very simple sampling runtime to using the performance events kernel API. An perf event attribute describing the setup and a function to handle the counter overflows are passed into _stp_perf_init(). This function sets up the event on each processor. If successfully initialized, a pointer data structure is returned. When the sampling is no longer needed _stp_perf_del() is called to shutdown the sampling. * runtime/perf.h: Add declarations for data structures and functions * runtime/perf.c: Remove old perfmon runtime runtime. Add _stp_perf_init() and _stp_perf_del() functions.
* Use 'static' as much as possibleJosh Stone2009-01-281-3/+3
| | | | | | | | | | This change just inserts 'static' on runtime, tapset, and generated C functions and globals, so the compiler can do a better job of optimizing. My tests with small scripts show ~10% reduction in compile time and ~20% reduction in module size. Larger scripts may show less benefit, but I expect purely positive results.
* Systemtap perfmon support to access the processors perfmon hardware.wcohen2006-09-121-0/+135