aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/itimer.c5
-rw-r--r--kernel/posix-cpu-timers.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/kernel/itimer.c b/kernel/itimer.c
index 8078a32d3b10..b03451ede528 100644
--- a/kernel/itimer.c
+++ b/kernel/itimer.c
@@ -12,6 +12,7 @@
12#include <linux/time.h> 12#include <linux/time.h>
13#include <linux/posix-timers.h> 13#include <linux/posix-timers.h>
14#include <linux/hrtimer.h> 14#include <linux/hrtimer.h>
15#include <trace/events/timer.h>
15 16
16#include <asm/uaccess.h> 17#include <asm/uaccess.h>
17 18
@@ -122,6 +123,7 @@ enum hrtimer_restart it_real_fn(struct hrtimer *timer)
122 struct signal_struct *sig = 123 struct signal_struct *sig =
123 container_of(timer, struct signal_struct, real_timer); 124 container_of(timer, struct signal_struct, real_timer);
124 125
126 trace_itimer_expire(ITIMER_REAL, sig->leader_pid, 0);
125 kill_pid_info(SIGALRM, SEND_SIG_PRIV, sig->leader_pid); 127 kill_pid_info(SIGALRM, SEND_SIG_PRIV, sig->leader_pid);
126 128
127 return HRTIMER_NORESTART; 129 return HRTIMER_NORESTART;
@@ -166,6 +168,8 @@ static void set_cpu_itimer(struct task_struct *tsk, unsigned int clock_id,
166 } 168 }
167 it->expires = nval; 169 it->expires = nval;
168 it->incr = ninterval; 170 it->incr = ninterval;
171 trace_itimer_state(clock_id == CPUCLOCK_VIRT ?
172 ITIMER_VIRTUAL : ITIMER_PROF, value, nval);
169 173
170 spin_unlock_irq(&tsk->sighand->siglock); 174 spin_unlock_irq(&tsk->sighand->siglock);
171 175
@@ -217,6 +221,7 @@ again:
217 } else 221 } else
218 tsk->signal->it_real_incr.tv64 = 0; 222 tsk->signal->it_real_incr.tv64 = 0;
219 223
224 trace_itimer_state(ITIMER_REAL, value, 0);
220 spin_unlock_irq(&tsk->sighand->siglock); 225 spin_unlock_irq(&tsk->sighand->siglock);
221 break; 226 break;
222 case ITIMER_VIRTUAL: 227 case ITIMER_VIRTUAL:
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index 12161f74744e..5c9dc228747b 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -8,6 +8,7 @@
8#include <linux/math64.h> 8#include <linux/math64.h>
9#include <asm/uaccess.h> 9#include <asm/uaccess.h>
10#include <linux/kernel_stat.h> 10#include <linux/kernel_stat.h>
11#include <trace/events/timer.h>
11 12
12/* 13/*
13 * Called after updating RLIMIT_CPU to set timer expiration if necessary. 14 * Called after updating RLIMIT_CPU to set timer expiration if necessary.
@@ -1090,9 +1091,13 @@ static void check_cpu_itimer(struct task_struct *tsk, struct cpu_itimer *it,
1090 cputime_one_jiffy); 1091 cputime_one_jiffy);
1091 it->error -= onecputick; 1092 it->error -= onecputick;
1092 } 1093 }
1093 } else 1094 } else {
1094 it->expires = cputime_zero; 1095 it->expires = cputime_zero;
1096 }
1095 1097
1098 trace_itimer_expire(signo == SIGPROF ?
1099 ITIMER_PROF : ITIMER_VIRTUAL,
1100 tsk->signal->leader_pid, cur_time);
1096 __group_send_sig_info(signo, SEND_SIG_PRIV, tsk); 1101 __group_send_sig_info(signo, SEND_SIG_PRIV, tsk);
1097 } 1102 }
1098 1103