summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linux/latencytop.h9
-rw-r--r--kernel/latencytop.c2
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/latencytop.h b/include/linux/latencytop.h
index 84f1053cf2a8..f5dfbb64bffc 100644
--- a/include/linux/latencytop.h
+++ b/include/linux/latencytop.h
@@ -11,6 +11,9 @@
#define _INCLUDE_GUARD_LATENCYTOP_H_
#include <linux/compiler.h>
+
+#include <asm/current.h>
+
struct task_struct;
#ifdef CONFIG_LATENCYTOP
@@ -51,4 +54,10 @@ static inline void clear_tsk_latency_tracing(struct task_struct *p)
#endif
+static inline void
+account_latency(int usecs)
+{
+ account_scheduler_latency(current, usecs, 0);
+}
+
#endif
diff --git a/kernel/latencytop.c b/kernel/latencytop.c
index 781249098cb6..04cc0dff6550 100644
--- a/kernel/latencytop.c
+++ b/kernel/latencytop.c
@@ -63,6 +63,7 @@ static DEFINE_RAW_SPINLOCK(latency_lock);
static struct latency_record latency_record[MAXLR];
int latencytop_enabled;
+EXPORT_SYMBOL_GPL(latencytop_enabled);
#ifdef CONFIG_SYSCTL
static int sysctl_latencytop(struct ctl_table *table, int write, void *buffer,
@@ -239,6 +240,7 @@ __account_scheduler_latency(struct task_struct *tsk, int usecs, int inter)
out_unlock:
raw_spin_unlock_irqrestore(&latency_lock, flags);
}
+EXPORT_SYMBOL_GPL(__account_scheduler_latency);
static int lstats_show(struct seq_file *m, void *v)
{