Lines Matching refs:task
107 static __always_inline void update_task_info(struct task_struct *task, __u32 cpu)
110 .pid = task->pid,
116 .tgid = task->tgid,
117 .is_kthread = task->flags & PF_KTHREAD ? 1 : 0,
119 BPF_CORE_READ_STR_INTO(&data.comm, task, comm);
141 static void on_sched_out(struct task_struct *task, __u64 ts, __u32 cpu)
146 pelem = bpf_task_storage_get(&kwork_top_task_time, task, NULL, 0);
154 .pid = task->pid,
155 .task_p = (__u64)task,
159 update_task_info(task, cpu);
162 static void on_sched_in(struct task_struct *task, __u64 ts)
166 pelem = bpf_task_storage_get(&kwork_top_task_time, task, NULL,
199 struct task_struct *task;
211 task = (struct task_struct *)bpf_get_current_task();
212 if (!task)
217 .pid = BPF_CORE_READ(task, pid),
218 .task_p = (__u64)task,
234 struct task_struct *task;
247 task = (struct task_struct *)bpf_get_current_task();
248 if (!task)
253 .pid = BPF_CORE_READ(task, pid),
254 .task_p = (__u64)task,
271 struct task_struct *task;
283 task = (struct task_struct *)bpf_get_current_task();
284 if (!task)
289 .pid = BPF_CORE_READ(task, pid),
290 .task_p = (__u64)task,
306 struct task_struct *task;
319 task = (struct task_struct *)bpf_get_current_task();
320 if (!task)
325 .pid = BPF_CORE_READ(task, pid),
326 .task_p = (__u64)task,