Release 4.7 include/linux/context_tracking_state.h
#ifndef _LINUX_CONTEXT_TRACKING_STATE_H
#define _LINUX_CONTEXT_TRACKING_STATE_H
#include <linux/percpu.h>
#include <linux/static_key.h>
struct context_tracking {
/*
* When active is false, probes are unset in order
* to minimize overhead: TIF flags are cleared
* and calls to user_enter/exit are ignored. This
* may be further optimized using static keys.
*/
bool active;
int recursion;
enum ctx_state {
CONTEXT_DISABLED = -1, /* returned by ct_state() if unknown */
CONTEXT_KERNEL = 0,
CONTEXT_USER,
CONTEXT_GUEST,
}
state;
};
#ifdef CONFIG_CONTEXT_TRACKING
extern struct static_key_false context_tracking_enabled;
DECLARE_PER_CPU(struct context_tracking, context_tracking);
static inline bool context_tracking_is_enabled(void)
{
return static_branch_unlikely(&context_tracking_enabled);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
frederic weisbecker | frederic weisbecker | 15 | 93.75% | 1 | 50.00% |
andy lutomirski | andy lutomirski | 1 | 6.25% | 1 | 50.00% |
| Total | 16 | 100.00% | 2 | 100.00% |
static inline bool context_tracking_cpu_is_enabled(void)
{
return __this_cpu_read(context_tracking.active);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
frederic weisbecker | frederic weisbecker | 17 | 100.00% | 2 | 100.00% |
| Total | 17 | 100.00% | 2 | 100.00% |
static inline bool context_tracking_in_user(void)
{
return __this_cpu_read(context_tracking.state) == CONTEXT_USER;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
frederic weisbecker | frederic weisbecker | 19 | 100.00% | 3 | 100.00% |
| Total | 19 | 100.00% | 3 | 100.00% |
#else
static inline bool context_tracking_in_user(void) { return false; }
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
frederic weisbecker | frederic weisbecker | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
static inline bool context_tracking_active(void) { return false; }
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
frederic weisbecker | frederic weisbecker | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
static inline bool context_tracking_is_enabled(void) { return false; }
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
rik van riel | rik van riel | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
static inline bool context_tracking_cpu_is_enabled(void) { return false; }
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
rik van riel | rik van riel | 12 | 100.00% | 1 | 100.00% |
| Total | 12 | 100.00% | 1 | 100.00% |
#endif /* CONFIG_CONTEXT_TRACKING */
#endif
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
frederic weisbecker | frederic weisbecker | 132 | 79.52% | 5 | 55.56% |
rik van riel | rik van riel | 26 | 15.66% | 2 | 22.22% |
andy lutomirski | andy lutomirski | 8 | 4.82% | 2 | 22.22% |
| Total | 166 | 100.00% | 9 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.