Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141034
b: refs/heads/master
c: be6f164
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt committed Mar 24, 2009
1 parent 59bb5d0 commit a301cc5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8aef2d2856158a36c295a8d1288281e4839bff13
refs/heads/master: be6f164a02f394675e2ac2077dd354cebef5b4c0
7 changes: 7 additions & 0 deletions trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2599,6 +2599,13 @@ ftrace_graph_probe_sched_switch(struct rq *__rq, struct task_struct *prev,
unsigned long long timestamp;
int index;

/*
* Does the user want to count the time a function was asleep.
* If so, do not update the time stamps.
*/
if (trace_flags & TRACE_ITER_SLEEP_TIME)
return;

timestamp = trace_clock_local();

prev->ftrace_timestamp = timestamp;
Expand Down
3 changes: 2 additions & 1 deletion trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static DECLARE_WAIT_QUEUE_HEAD(trace_wait);

/* trace_flags holds trace_options default values */
unsigned long trace_flags = TRACE_ITER_PRINT_PARENT | TRACE_ITER_PRINTK |
TRACE_ITER_ANNOTATE | TRACE_ITER_CONTEXT_INFO;
TRACE_ITER_ANNOTATE | TRACE_ITER_CONTEXT_INFO | TRACE_ITER_SLEEP_TIME;

/**
* trace_wake_up - wake up tasks waiting for trace input
Expand Down Expand Up @@ -316,6 +316,7 @@ static const char *trace_options[] = {
"context-info",
"latency-format",
"global-clock",
"sleep-time",
NULL
};

Expand Down
1 change: 1 addition & 0 deletions trunk/kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ enum trace_iterator_flags {
TRACE_ITER_CONTEXT_INFO = 0x20000, /* Print pid/cpu/time */
TRACE_ITER_LATENCY_FMT = 0x40000,
TRACE_ITER_GLOBAL_CLK = 0x80000,
TRACE_ITER_SLEEP_TIME = 0x100000,
};

/*
Expand Down

0 comments on commit a301cc5

Please sign in to comment.