24 Dec, 2011
1 commit
-
If CONFIG_SCHEDSTATS is defined, the kernel maintains
information about how long the task was sleeping or
in the case of iowait, blocking in the kernel before
getting woken up.This will be useful for sleep time profiling.
Note: this information is only provided for sched_fair.
Other scheduling classes may choose to provide this in
the future.Note: the delay includes the time spent on the runqueue
as well.Signed-off-by: Arun Sharma
Acked-by: Peter Zijlstra
Cc: Steven Rostedt
Cc: Mathieu Desnoyers
Cc: Arnaldo Carvalho de Melo
Cc: Andrew Vagin
Cc: Frederic Weisbecker
Link: http://lkml.kernel.org/r/1324512940-32060-2-git-send-email-asharma@fb.com
Signed-off-by: Ingo Molnar
06 Dec, 2011
1 commit
-
This tracepoint shows how long a task is sleeping in uninterruptible state.
E.g. it may show how long and where a mutex is waited for.
Signed-off-by: Andrew Vagin
Signed-off-by: Peter Zijlstra
Link: http://lkml.kernel.org/r/1322471015-107825-8-git-send-email-avagin@openvz.org
Signed-off-by: Ingo Molnar
26 Sep, 2011
1 commit
-
We had need to see the difference between scheduling a runnable task and
a runnable task being involuntarily preempted.No app should rely on the old string output (the binary
trace event record format is not changed).Signed-off-by: Peter Zijlstra
Cc: Thomas Gleixner
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1316164603.10174.11.camel@twins
Signed-off-by: Ingo Molnar
21 Sep, 2010
1 commit
-
Add a tracepoint that shows the priority of a task being boosted
via priority inheritance.Cc: Gregory Haskins
Acked-by: Peter Zijlstra
Signed-off-by: Steven Rostedt
29 Jun, 2010
1 commit
-
Convert sched_wait_task to DEFINE_EVENT, and save ~1K:
text data bss dec hex filename
104595 9424 4992 119011 1d0e3 kernel/sched.o.orig
103619 9344 4992 117955 1ccc3 kernel/sched.oNo change in functionality.
Signed-off-by: Li Zefan
LKML-Reference:
Signed-off-by: Steven Rostedt
01 Jun, 2010
1 commit
-
For CONFIG_PREEMPT=y kernels the sched_switch(.prev_state) argument isn't
useful because we can get preempted with current->state != TASK_RUNNING
without actually getting removed from the runqueue.Cure this by treating all preempted tasks as runnable from the tracer's
point of view.Signed-off-by: Peter Zijlstra
Cautiously-acked-by: Steven Rostedt
LKML-Reference:
Signed-off-by: Ingo Molnar
07 May, 2010
1 commit
-
struct rq isn't visible outside of sched.o so its near useless to
expose the pointer, also there are no users of it, so remove it.Acked-by: Steven Rostedt
Signed-off-by: Peter Zijlstra
LKML-Reference:
Signed-off-by: Ingo Molnar
26 Nov, 2009
3 commits
-
Move signal sending event to events/signal.h. This patch also
renames sched_signal_send event to signal_generate.Changes in v4:
- Fix a typo of task_struct pointer.Changes in v3:
- Add docbook style commentsChanges in v2:
- Add siginfo argument
- Add siginfo storing macroSigned-off-by: Masami Hiramatsu
Reviewed-by: Jason Baron
Acked-by: Roland McGrath
Cc: systemtap
Cc: DLE
Cc: Oleg Nesterov
LKML-Reference:
Signed-off-by: Ingo Molnar -
The original format for sched_stat_iowait and sched_stat_sleep:
$ cat events/sched/sched_stat_iowait/format
...
print fmt: "comm=%s pid=%d delay=%Lu [ns]", ...
$ cat events/sched/sched_stat_sleep/format
...
print fmt: "comm=%s pid=%d delay=%Lu [ns]", ...But commit commit 75ec29ab848a7e92a41aaafaeb33d1afbc839be4
("tracing: Convert some sched trace events to DEFINE_EVENT and
_PRINT") broke the format:$ cat events/sched/sched_stat_iowait/format
print fmt: "task: %s:%d iowait: %Lu [ns]", ...
$ cat events/sched/sched_stat_sleep/format
print fmt: "task: %s:%d sleep: %Lu [ns]", ...No change in functionality.
Signed-off-by: Li Zefan
Cc: Steven Rostedt
Cc: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Ingo Molnar -
It is not quite obvious at first sight what TRACE_EVENT_TEMPLATE
does: does it define an event as well beyond defining a template?To clarify this, rename it to DECLARE_EVENT_CLASS, which follows
the various 'DECLARE_*()' idioms we already have in the kernel:DECLARE_EVENT_CLASS(class)
DEFINE_EVENT(class, event1)
DEFINE_EVENT(class, event2)
DEFINE_EVENT(class, event3)To complete this logic we should also rename TRACE_EVENT() to:
DEFINE_SINGLE_EVENT(single_event)
... but in a more quiet moment of the kernel cycle.
Cc: Pekka Enberg
Cc: Steven Rostedt
Cc: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Ingo Molnar
25 Nov, 2009
1 commit
-
Converting some of the scheduler trace events to use the
TRACE_EVENT_TEMPLATE, DEFINE_EVENT and DEFINE_EVENT_PRINT helped to
save some space:$ size kernel/sched.o-*
text data bss dec hex filename
79299 6776 2520 88595 15a13 kernel/sched.o-notrace
101941 11896 2584 116421 1c6c5 kernel/sched.o-templ
104779 11896 2584 119259 1d1db kernel/sched.o-tracesched.o-notrace is without any tracepoints compiled
sched.o-templ is with this patch
sched.o-trace is the tracepoints before this patchThe trace events converted to DEFINE_EVENT:
sched_wakeup, sched_wakeup_new, sched_process_free, sched_process_exit,
and sched_stat_wait.The trace events converted to DEFINE_EVENT_PRINT:
sched_stat_sleep and sched_stat_iowait.
Note, since the TRACE_EVENT_TEMPLATE always uses a print, the
sched_stat_wait print format is defined in the template and this
template is used by sched_stat_sleep and sched_stat_iowait. But the
later two override the print format.Signed-off-by: Steven Rostedt
15 Oct, 2009
1 commit
-
Now that we can filter based on fields via perf record, people
will start using filter expressions and will expect them to
be obvious.The primary way to see which fields are available is by looking
at the trace output, such as:gcc-18676 [000] 343.011728: irq_handler_entry: irq=0 handler=timer
cc1-18677 [000] 343.012727: irq_handler_entry: irq=0 handler=timer
cc1-18677 [000] 343.032692: irq_handler_entry: irq=0 handler=timer
cc1-18677 [000] 343.033690: irq_handler_entry: irq=0 handler=timer
cc1-18677 [000] 343.034687: irq_handler_entry: irq=0 handler=timer
cc1-18677 [000] 343.035686: irq_handler_entry: irq=0 handler=timer
cc1-18677 [000] 343.036684: irq_handler_entry: irq=0 handler=timerWhile 'irq==0' filters work, the 'handler==' filter expression
does not work:$ perf record -R -f -a -e irq:irq_handler_entry --filter handler=timer sleep 1
Error: failed to set filter with 22 (Invalid argument)The problem is that while an 'irq' field exists and is recognized
as a filter field - 'handler' does not exist - its name is 'name'
in the output.To solve this, we need to synchronize the printout and the field
names, wherever possible.In cases where the printout prints a non-field, we enclose
that information in square brackets, such as:perf-1380 [013] 724.903505: softirq_exit: vec=9 [action=RCU]
perf-1380 [013] 724.904482: softirq_exit: vec=1 [action=TIMER]This way users can use filter expressions more intuitively: all
fields that show up as 'primary' (non-bracketed) information is
filterable.This patch harmonizes the field names for all irq, bkl, power,
sched and timer events.We might in fact think about dropping the print format bit of
generic tracepoints altogether, and just print the fields that
are being recorded.Cc: Li Zefan
Cc: Tom Zanussi
Cc: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Arnaldo Carvalho de Melo
LKML-Reference:
Signed-off-by: Ingo Molnar
14 Sep, 2009
1 commit
-
This allows more precise tracking of how the scheduler accounts
(and acts upon) a task having spent N nanoseconds of CPU time.Cc: Peter Zijlstra
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Arnaldo Carvalho de Melo
Cc: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Ingo Molnar
12 Sep, 2009
1 commit
-
…el/git/tip/linux-2.6-tip
* 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (105 commits)
ring-buffer: only enable ring_buffer_swap_cpu when needed
ring-buffer: check for swapped buffers in start of committing
tracing: report error in trace if we fail to swap latency buffer
tracing: add trace_array_printk for internal tracers to use
tracing: pass around ring buffer instead of tracer
tracing: make tracing_reset safe for external use
tracing: use timestamp to determine start of latency traces
tracing: Remove mentioning of legacy latency_trace file from documentation
tracing/filters: Defer pred allocation, fix memory leak
tracing: remove users of tracing_reset
tracing: disable buffers and synchronize_sched before resetting
tracing: disable update max tracer while reading trace
tracing: print out start and stop in latency traces
ring-buffer: disable all cpu buffers when one finds a problem
ring-buffer: do not count discarded events
ring-buffer: remove ring_buffer_event_discard
ring-buffer: fix ring_buffer_read crossing pages
ring-buffer: remove unnecessary cpu_relax
ring-buffer: do not swap buffers during a commit
ring-buffer: do not reset while in a commit
...
02 Sep, 2009
1 commit
-
Add 3 schedstat tracepoints to help account for wait-time,
sleep-time and iowait-time.They can also be used as a perf-counter source to profile tasks
on these clocks.Signed-off-by: Peter Zijlstra
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Arjan van de Ven
LKML-Reference:
[ build fix for the !CONFIG_SCHEDSTATS case ]
Signed-off-by: Ingo Molnar
26 Aug, 2009
1 commit
-
While debugging the scheduler push / pull algorithm, I found
it very annoying that the sched wake up events did not show
the CPU that the task was waking on. In order to analyze the
scheduler, I needed that information.This patch adds recording of the CPU that a task is waking up
on.Signed-off-by: Steven Rostedt
13 Jul, 2009
1 commit
-
If TRACE_INCLDUE_FILE is defined,
will be included and compiled, otherwise it will beSo TRACE_SYSTEM should be defined outside of #if proctection,
just like TRACE_INCLUDE_FILE.Imaging this scenario:
#include
-> TRACE_SYSTEM == foo
...
#include
-> TRACE_SYSTEM == bar
...
#define CREATE_TRACE_POINTS
#include
-> TRACE_SYSTEM == bar !!!and then bar.h will be included and compiled.
Signed-off-by: Li Zefan
Cc: Steven Rostedt
Cc: Frederic Weisbecker
LKML-Reference:
Signed-off-by: Ingo Molnar
27 May, 2009
1 commit
-
It is useful to see the state of a task that is being switched out.
This patch adds the output of the state of the previous task in
the context switch event.[ Impact: see state of switched out task in context switch ]
Signed-off-by: Steven Rostedt
Signed-off-by: Frederic Weisbecker
06 May, 2009
1 commit
-
The orig_cpu parameter in trace_sched_migrate_task() is not necessary,
it can be got by using task_cpu(p) in the probe.[ Impact: micro-optimization ]
Signed-off-by: Mathieu Desnoyers
[ modified from Mathieu's patch. The original patch is at:
http://marc.info/?l=linux-kernel&m=123791201716239&w=2 ]
Signed-off-by: Xiao Guangrong
Cc: fweisbec@gmail.com
Cc: rostedt@goodmis.org
Cc: Li Zefan
Cc: zhaolei@cn.fujitsu.com
Cc: laijs@cn.fujitsu.com
LKML-Reference:
Signed-off-by: Ingo Molnar
15 Apr, 2009
1 commit
-
Impact: clean up
Create a sub directory in include/trace called events to keep the
trace point headers in their own separate directory. Only headers that
declare trace points should be defined in this directory.Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: Neil Horman
Cc: Zhao Lei
Cc: Eduard - Gabriel Munteanu
Cc: Pekka Enberg
Signed-off-by: Steven Rostedt