Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140861
b: refs/heads/master
c: e9d25fe
h: refs/heads/master
i:
  140859: 4f840e0
v: v3
  • Loading branch information
Steven Rostedt committed Mar 5, 2009
1 parent f5f50e0 commit 7c18416
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27d48be84477d2f0a2e2ac3738a3971dece631d5
refs/heads/master: e9d25fe6eaa2c720bb3ea661b660e58d54fa38bf
8 changes: 8 additions & 0 deletions trunk/kernel/trace/trace_irqsoff.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ enum {

static int trace_type __read_mostly;

static int save_lat_flag;

#ifdef CONFIG_PREEMPT_TRACER
static inline int
preempt_trace(void)
Expand Down Expand Up @@ -370,6 +372,9 @@ static void stop_irqsoff_tracer(struct trace_array *tr)

static void __irqsoff_tracer_init(struct trace_array *tr)
{
save_lat_flag = trace_flags & TRACE_ITER_LATENCY_FMT;
trace_flags |= TRACE_ITER_LATENCY_FMT;

tracing_max_latency = 0;
irqsoff_trace = tr;
/* make sure that the tracer is visible */
Expand All @@ -380,6 +385,9 @@ static void __irqsoff_tracer_init(struct trace_array *tr)
static void irqsoff_tracer_reset(struct trace_array *tr)
{
stop_irqsoff_tracer(tr);

if (!save_lat_flag)
trace_flags &= ~TRACE_ITER_LATENCY_FMT;
}

static void irqsoff_tracer_start(struct trace_array *tr)
Expand Down
8 changes: 8 additions & 0 deletions trunk/kernel/trace/trace_sched_wakeup.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ static raw_spinlock_t wakeup_lock =

static void __wakeup_reset(struct trace_array *tr);

static int save_lat_flag;

#ifdef CONFIG_FUNCTION_TRACER
/*
* irqsoff uses its own tracer function to keep the overhead down:
Expand Down Expand Up @@ -324,6 +326,9 @@ static void stop_wakeup_tracer(struct trace_array *tr)

static int __wakeup_tracer_init(struct trace_array *tr)
{
save_lat_flag = trace_flags & TRACE_ITER_LATENCY_FMT;
trace_flags |= TRACE_ITER_LATENCY_FMT;

tracing_max_latency = 0;
wakeup_trace = tr;
start_wakeup_tracer(tr);
Expand All @@ -347,6 +352,9 @@ static void wakeup_tracer_reset(struct trace_array *tr)
stop_wakeup_tracer(tr);
/* make sure we put back any tasks we are tracing */
wakeup_reset(tr);

if (!save_lat_flag)
trace_flags &= ~TRACE_ITER_LATENCY_FMT;
}

static void wakeup_tracer_start(struct trace_array *tr)
Expand Down

0 comments on commit 7c18416

Please sign in to comment.