Skip to content

Commit

Permalink
timer_list: print real timer address
Browse files Browse the repository at this point in the history
The current timer_list output prints the address of the on stack copy
of the active hrtimer instead of the hrtimer itself.

Print the address of the real timer instead.

Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
KAGA-KOKO committed Oct 20, 2008
1 parent 0cfd810 commit e67ef25
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kernel/time/timer_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ static void print_name_offset(struct seq_file *m, void *sym)
}

static void
print_timer(struct seq_file *m, struct hrtimer *timer, int idx, u64 now)
print_timer(struct seq_file *m, struct hrtimer *taddr, struct hrtimer *timer,
int idx, u64 now)
{
#ifdef CONFIG_TIMER_STATS
char tmp[TASK_COMM_LEN + 1];
#endif
SEQ_printf(m, " #%d: ", idx);
print_name_offset(m, timer);
print_name_offset(m, taddr);
SEQ_printf(m, ", ");
print_name_offset(m, timer->function);
SEQ_printf(m, ", S:%02lx", timer->state);
Expand Down Expand Up @@ -99,7 +100,7 @@ print_active_timers(struct seq_file *m, struct hrtimer_clock_base *base,
tmp = *timer;
spin_unlock_irqrestore(&base->cpu_base->lock, flags);

print_timer(m, &tmp, i, now);
print_timer(m, timer, &tmp, i, now);
next++;
goto next_one;
}
Expand Down

0 comments on commit e67ef25

Please sign in to comment.