diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/tegra-profiler/hrt.c | 14 | ||||
-rw-r--r-- | drivers/misc/tegra-profiler/version.h | 2 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/misc/tegra-profiler/hrt.c b/drivers/misc/tegra-profiler/hrt.c index 8081a03cd6b1..88a0d967e096 100644 --- a/drivers/misc/tegra-profiler/hrt.c +++ b/drivers/misc/tegra-profiler/hrt.c @@ -51,6 +51,11 @@ struct hrt_event_value { u32 value; }; +static inline u32 get_task_state(struct task_struct *task) +{ + return (u32)(task->state | task->exit_state); +} + static enum hrtimer_restart hrtimer_handler(struct hrtimer *hrtimer) { struct pt_regs *regs; @@ -231,8 +236,8 @@ put_sched_sample(struct task_struct *task, int is_sched_in) s->reserved = 0; - s->data[0] = 0; - s->data[1] = 0; + s->data[QUADD_SCHED_IDX_TASK_STATE] = get_task_state(task); + s->data[QUADD_SCHED_IDX_RESERVED] = 0; quadd_put_sample_this_cpu(&record, NULL, 0); } @@ -354,6 +359,9 @@ read_all_sources(struct pt_regs *regs, struct task_struct *task) if (!task) task = current; + if (task_is_dead(task)) + return; + rcu_read_lock(); if (!task_nsproxy(task)) { rcu_read_unlock(); @@ -458,7 +466,7 @@ read_all_sources(struct pt_regs *regs, struct task_struct *task) vec[vec_idx].len = nr_positive_events * sizeof(events_extra[0]); vec_idx++; - state = task->state; + state = get_task_state(task); if (state) { s->state = 1; vec[vec_idx].base = &state; diff --git a/drivers/misc/tegra-profiler/version.h b/drivers/misc/tegra-profiler/version.h index bf4c27597c4a..f956c1d40861 100644 --- a/drivers/misc/tegra-profiler/version.h +++ b/drivers/misc/tegra-profiler/version.h @@ -18,7 +18,7 @@ #ifndef __QUADD_VERSION_H #define __QUADD_VERSION_H -#define QUADD_MODULE_VERSION "1.95" +#define QUADD_MODULE_VERSION "1.96" #define QUADD_MODULE_BRANCH "Dev" #endif /* __QUADD_VERSION_H */ |