| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
* buildrun.cxx (output_cpu_khz): New function to check cpu_khz.
(compile_pass): Invoke function output_cpu_khz.
* runtime/time.c : Use STAPCONF_CPU_KHZ.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
do_div accepts unsigned 64-bit integer type for dividend, signed types
would cause do_div's typecheck fail:
stat-common.c: In function 'needed_space':
stat-common.c:50: error: comparison of distinct pointer types lacks a cast
...same errors in time.c and tapset-timers.cxx's generated code...
A fix for time.c is special, on ppc32 cycles_t is 32-bit, so technically
we don't need do_div, but since the whole _stp_gettimeofday_ns() operates
on 64-bit types we'd better be safe and use uint64_t for the math.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
|
|
|
|
|
|
|
|
| |
Our gettimeofday runtime has frequent wakeups to stay in sync with
kernel time, but this is wasted effort if gettimeofday is not used in
the script. This patch moves the calls to _stp_time_init and
_stp_time_kill into begin and end/error probes, which only get pulled in
if one of the gettimeofday variants is called.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
gettimeofday_* internals
|
|
|
|
|
|
|
|
| |
This is a generalization of the patch from James Bottomley:
http://sources.redhat.com/ml/systemtap/2008-q3/msg00220.html
The on_each_cpu() change was merged *after* the 2.6.26 release, so I'm
using an autoconf test instead of James' version check.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 3916
* buildrun.cxx (compile_pass): Add new autoconf options for checking
time related APIs.
* time.c (stp_time_t): Rename cpufreq to freq.
(__stp_get_freq): Rename from __stp_estimate_cpufreq. Use tsc_khz or
cpu_khz if it is available. Use itc_freq on ia64.
(__stp_ktime_get_real_ts): New function to get current kernel time.
(__stp_time_timer_callback): Call __stp_ktime_get_real_ts to get
base time.
(__stp_init_time): Ditto.
(__stp_constant_freq): New function to check the processor has
constant frequency timestamp counter.
(_stp_kill_time): Don't use the cpufreq notifier if the processor has
constant frequency timestamp counter.
(_stp_init_time): Ditto.
* autoconf-ktime-get-real.c : New file.
* autoconf-constant-tsc.c: Ditto.
* autoconf-tsc-khz.c: Ditto.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch from Quentin Barnes.
* arith.c: Add arm support for 64-bit division.
* copy.c: Enable arm support.
* loc2c-runtime.h: Ditto.
* regs.[ch]: Ditto.
* stack.c: Include stack-arm.c.
* stack-arm.c: New file.
* time.c (_stp_gettimeofday_ns): hack
for arm. See PR 4569.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 4179.
Based on patch from Vasily Averin <vvs@sw.ru>:
* time.c (_stp_init_time): Recover from partial failures.
2007-03-12 Frank Ch. Eigler <fche@redhat.com>
PR 4179.
Based on patch from Vasily Averin <vvs@sw.ru>:
* procfs.c (_stp_register_procfs): Recover from partial failures.
* transport.c (_stp_transport_open): Ditto.
|
|
|
|
|
|
|
|
|
|
| |
* alloc.c (_stp_kmalloc): New function. Call kmalloc
with the coirrect flags and track usage.
(_stp_kzalloc): Ditto.
* map.c: Use new alloc calls.
* print.c: Ditto.
* stat.c: Ditto.
* time.c: Ditto.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 3623.
* tapsets.cxx (timer_derived_probe_group::emit_module_decls): Restart
the timers if we are in STARTING or RUNNING state.
(hrtimer_derived_probe_group::emit_module_decls): Ditto.
(be_derived_probe_group::emit_module_init): indicate error to the rest
of the initialization if any begin probes fail.
* translate.cxx (c_unparser::emit_module_init): Set the global error
state on an initialization error so timers know to shut down.
runtime/
* time.c (stp_timer_reregister): Add a global to control whether the
gettimeofday timer should restart itself, for clean shutdown.
(__stp_time_timer_callback): Check the global.
(_stp_kill_time, _stp_init_time): Set the global.
(_stp_gettimeofday_ns): Switch to preempt_enable_no_resched.
* time.c (__stp_time_cpufreq_callback): Use the cpu# from the notifier.
(_stp_init_time): No need to disable preemption around cpufreq init.
|
|
|
|
|
|
|
| |
From David Wilder <dwilder@us.ibm.com>
* time.c (__stp_estimate_cpufreq): Short-circuit on s390.
(_stp_gettimeofday_ns): Use a fixed formula on s390 to
convert TOD clocks to nanoseconds.
|
|
|
|
|
|
|
| |
* time.c (_stp_init_time): Use dynamic percpu allocations
instead of evil static allocations.
(_stp_kill_time): Free percpu allocations and set
_stp_time to NULL so the timers are only deleted once.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 3233
./
* stapfuncs.5.in: Document new gettimeofday_ns.
runtime/
* time.c (stp_time_t): Use ns for the base time, and freq is now kHz.
(__stp_estimate_cpufreq): Compute kHz instead of MHz.
(__stp_time_timer_callback, __stp_init_time): Compute base in ns.
(__stp_time_cpufreq_callback): Record kHz instead of MHz.
(_stp_init_time): Record kHz, and disable preemption to avoid a race
in the cpufreq notifier.
(_stp_gettimeofday_ns): Converted from _stp_gettimeofday_us.
tapset/
* timestamp.stp (gettimeofday_ns): New function
(gettimeofday_us, gettimeofday_ms, gettimeofday_s):
Use gettimeofday_ns as the base unit.
testsuite/
* buildok/timestamp.stp: add gettimeofday_ns test.
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 2922
* time.c (_stp_init_time): call cpufreq_get for each cpu from
a non-atomic context (module init time).
* time.c (__stp_init_time): remove call to cpufreq_get from IPI.
* time.c (__stp_time_timer_callback): disable IRQ's to avoid
perturbations in measurements.
* time.c (_stp_gettimeofday_us): disable preemption to avoid CPU
swaps while we're computing the time.
|
|
|
|
| |
* time.c: Do cpufreq notification only if CONFIG_CPU_FREQ defined.
|
|
runtime/
* time.c: Time-estimation with minimal dependency on xtime.
runtime/transport/
* transport/transport.c (_stp_handle_start): Initialize timer functions.
* transport.c (_stp_cleanup_and_exit): Teardown timer functions.
tapset/
* timestamp.stp (gettimeofday_us, gettimeofday_ms, gettimeofday_s):
Convert to using the runtime-provided _stp_gettimeofday_us().
|