aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/oom_kill.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index eeb27e27dce3..7c122faa05c5 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -33,6 +33,10 @@
33#include <linux/security.h> 33#include <linux/security.h>
34#include <linux/ptrace.h> 34#include <linux/ptrace.h>
35#include <linux/freezer.h> 35#include <linux/freezer.h>
36#include <linux/ftrace.h>
37
38#define CREATE_TRACE_POINTS
39#include <trace/events/oom.h>
36 40
37int sysctl_panic_on_oom; 41int sysctl_panic_on_oom;
38int sysctl_oom_kill_allocating_task; 42int sysctl_oom_kill_allocating_task;
@@ -55,6 +59,7 @@ void compare_swap_oom_score_adj(int old_val, int new_val)
55 spin_lock_irq(&sighand->siglock); 59 spin_lock_irq(&sighand->siglock);
56 if (current->signal->oom_score_adj == old_val) 60 if (current->signal->oom_score_adj == old_val)
57 current->signal->oom_score_adj = new_val; 61 current->signal->oom_score_adj = new_val;
62 trace_oom_score_adj_update(current);
58 spin_unlock_irq(&sighand->siglock); 63 spin_unlock_irq(&sighand->siglock);
59} 64}
60 65
@@ -74,6 +79,7 @@ int test_set_oom_score_adj(int new_val)
74 spin_lock_irq(&sighand->siglock); 79 spin_lock_irq(&sighand->siglock);
75 old_val = current->signal->oom_score_adj; 80 old_val = current->signal->oom_score_adj;
76 current->signal->oom_score_adj = new_val; 81 current->signal->oom_score_adj = new_val;
82 trace_oom_score_adj_update(current);
77 spin_unlock_irq(&sighand->siglock); 83 spin_unlock_irq(&sighand->siglock);
78 84
79 return old_val; 85 return old_val;