Skip to content

Commit 502adf5

Browse files
committed
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: watchdog: Don't throttle the watchdog tracing: Fix timer tracing
2 parents 3b6c550 + c6db67c commit 502adf5

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

include/trace/events/timer.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,16 @@ TRACE_EVENT(timer_expire_entry,
8181
TP_STRUCT__entry(
8282
__field( void *, timer )
8383
__field( unsigned long, now )
84+
__field( void *, function)
8485
),
8586

8687
TP_fast_assign(
8788
__entry->timer = timer;
8889
__entry->now = jiffies;
90+
__entry->function = timer->function;
8991
),
9092

91-
TP_printk("timer=%p now=%lu", __entry->timer, __entry->now)
93+
TP_printk("timer=%p function=%pf now=%lu", __entry->timer, __entry->function,__entry->now)
9294
);
9395

9496
/**
@@ -200,14 +202,16 @@ TRACE_EVENT(hrtimer_expire_entry,
200202
TP_STRUCT__entry(
201203
__field( void *, hrtimer )
202204
__field( s64, now )
205+
__field( void *, function)
203206
),
204207

205208
TP_fast_assign(
206209
__entry->hrtimer = hrtimer;
207210
__entry->now = now->tv64;
211+
__entry->function = hrtimer->function;
208212
),
209213

210-
TP_printk("hrtimer=%p now=%llu", __entry->hrtimer,
214+
TP_printk("hrtimer=%p function=%pf now=%llu", __entry->hrtimer, __entry->function,
211215
(unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now }))
212216
);
213217

kernel/watchdog.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ void watchdog_overflow_callback(struct perf_event *event, int nmi,
206206
struct perf_sample_data *data,
207207
struct pt_regs *regs)
208208
{
209+
/* Ensure the watchdog never gets throttled */
210+
event->hw.interrupts = 0;
211+
209212
if (__get_cpu_var(watchdog_nmi_touch) == true) {
210213
__get_cpu_var(watchdog_nmi_touch) = false;
211214
return;

0 commit comments

Comments
 (0)