1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #undef TRACE_SYSTEM 3 #define TRACE_SYSTEM sched 4 #define TRACE_INCLUDE_PATH trace/hooks 5 #if !defined(_TRACE_HOOK_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) 6 #define _TRACE_HOOK_SCHED_H 7 #include <trace/hooks/vendor_hooks.h> 8 /* 9 * Following tracepoints are not exported in tracefs and provide a 10 * mechanism for vendor modules to hook and extend functionality 11 */ 12 struct task_struct; 13 DECLARE_RESTRICTED_HOOK(android_rvh_select_task_rq_fair, 14 TP_PROTO(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags, int *new_cpu), 15 TP_ARGS(p, prev_cpu, sd_flag, wake_flags, new_cpu), 1); 16 17 DECLARE_RESTRICTED_HOOK(android_rvh_select_task_rq_rt, 18 TP_PROTO(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags, int *new_cpu), 19 TP_ARGS(p, prev_cpu, sd_flag, wake_flags, new_cpu), 1); 20 21 DECLARE_RESTRICTED_HOOK(android_rvh_select_task_rq_dl, 22 TP_PROTO(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags, int *new_cpu), 23 TP_ARGS(p, prev_cpu, sd_flag, wake_flags, new_cpu), 1); 24 25 DECLARE_RESTRICTED_HOOK(android_rvh_select_fallback_rq, 26 TP_PROTO(int cpu, struct task_struct *p, int *new_cpu), 27 TP_ARGS(cpu, p, new_cpu), 1); 28 29 struct rq; 30 DECLARE_HOOK(android_vh_scheduler_tick, 31 TP_PROTO(struct rq *rq), 32 TP_ARGS(rq)); 33 34 DECLARE_RESTRICTED_HOOK(android_rvh_enqueue_task, 35 TP_PROTO(struct rq *rq, struct task_struct *p, int flags), 36 TP_ARGS(rq, p, flags), 1); 37 38 DECLARE_RESTRICTED_HOOK(android_rvh_dequeue_task, 39 TP_PROTO(struct rq *rq, struct task_struct *p, int flags), 40 TP_ARGS(rq, p, flags), 1); 41 42 DECLARE_RESTRICTED_HOOK(android_rvh_can_migrate_task, 43 TP_PROTO(struct task_struct *p, int dst_cpu, int *can_migrate), 44 TP_ARGS(p, dst_cpu, can_migrate), 1); 45 46 DECLARE_RESTRICTED_HOOK(android_rvh_find_lowest_rq, 47 TP_PROTO(struct task_struct *sched_ctx, struct task_struct *exec_ctx, 48 struct cpumask *local_cpu_mask, int ret, int *lowest_cpu), 49 TP_ARGS(sched_ctx, exec_ctx, local_cpu_mask, ret, lowest_cpu), 1); 50 51 DECLARE_RESTRICTED_HOOK(android_rvh_prepare_prio_fork, 52 TP_PROTO(struct task_struct *p), 53 TP_ARGS(p), 1); 54 55 DECLARE_RESTRICTED_HOOK(android_rvh_finish_prio_fork, 56 TP_PROTO(struct task_struct *p), 57 TP_ARGS(p), 1); 58 59 DECLARE_RESTRICTED_HOOK(android_rvh_rtmutex_prepare_setprio, 60 TP_PROTO(struct task_struct *p, struct task_struct *pi_task), 61 TP_ARGS(p, pi_task), 1); 62 63 DECLARE_RESTRICTED_HOOK(android_rvh_rto_next_cpu, 64 TP_PROTO(int rto_cpu, struct cpumask *rto_mask, int *cpu), 65 TP_ARGS(rto_cpu, rto_mask, cpu), 1); 66 67 DECLARE_RESTRICTED_HOOK(android_rvh_is_cpu_allowed, 68 TP_PROTO(struct task_struct *p, int cpu, bool *allowed), 69 TP_ARGS(p, cpu, allowed), 1); 70 71 DECLARE_RESTRICTED_HOOK(android_rvh_get_nohz_timer_target, 72 TP_PROTO(int *cpu, bool *done), 73 TP_ARGS(cpu, done), 1); 74 75 DECLARE_RESTRICTED_HOOK(android_rvh_set_user_nice, 76 TP_PROTO(struct task_struct *p, long *nice), 77 TP_ARGS(p, nice), 1); 78 79 DECLARE_RESTRICTED_HOOK(android_rvh_set_user_nice_locked, 80 TP_PROTO(struct task_struct *p, long *nice, bool *allowed), 81 TP_ARGS(p, nice, allowed), 1); 82 83 DECLARE_RESTRICTED_HOOK(android_rvh_setscheduler, 84 TP_PROTO(struct task_struct *p), 85 TP_ARGS(p), 1); 86 87 DECLARE_RESTRICTED_HOOK(android_rvh_setscheduler_prio, 88 TP_PROTO(struct task_struct *p), 89 TP_ARGS(p), 1); 90 91 DECLARE_RESTRICTED_HOOK(android_rvh_replace_next_task_fair, 92 TP_PROTO(struct rq *rq, struct task_struct **p, struct task_struct *prev), 93 TP_ARGS(rq, p, prev), 1); 94 95 struct sched_group; 96 DECLARE_RESTRICTED_HOOK(android_rvh_sched_balance_find_src_group, 97 TP_PROTO(struct sched_group *busiest, struct rq *dst_rq, int *out_balance), 98 TP_ARGS(busiest, dst_rq, out_balance), 1); 99 100 DECLARE_HOOK(android_vh_dump_throttled_rt_tasks, 101 TP_PROTO(int cpu, u64 clock, ktime_t rt_period, u64 rt_runtime, 102 s64 rt_period_timer_expires), 103 TP_ARGS(cpu, clock, rt_period, rt_runtime, rt_period_timer_expires)); 104 105 DECLARE_HOOK(android_vh_jiffies_update, 106 TP_PROTO(void *unused), 107 TP_ARGS(unused)); 108 109 struct rq_flags; 110 DECLARE_RESTRICTED_HOOK(android_rvh_sched_newidle_balance, 111 TP_PROTO(struct rq *this_rq, struct rq_flags *rf, 112 int *pulled_task, int *done), 113 TP_ARGS(this_rq, rf, pulled_task, done), 1); 114 115 DECLARE_RESTRICTED_HOOK(android_rvh_sched_nohz_balancer_kick, 116 TP_PROTO(struct rq *rq, unsigned int *flags, int *done), 117 TP_ARGS(rq, flags, done), 1); 118 119 DECLARE_RESTRICTED_HOOK(android_rvh_sched_rebalance_domains, 120 TP_PROTO(struct rq *rq, int *continue_balancing), 121 TP_ARGS(rq, continue_balancing), 1); 122 123 DECLARE_RESTRICTED_HOOK(android_rvh_find_busiest_queue, 124 TP_PROTO(int dst_cpu, struct sched_group *group, 125 struct cpumask *env_cpus, struct rq **busiest, 126 int *done), 127 TP_ARGS(dst_cpu, group, env_cpus, busiest, done), 1); 128 129 DECLARE_RESTRICTED_HOOK(android_rvh_migrate_queued_task, 130 TP_PROTO(struct rq *rq, struct rq_flags *rf, 131 struct task_struct *p, int new_cpu, 132 int *detached), 133 TP_ARGS(rq, rf, p, new_cpu, detached), 1); 134 135 DECLARE_RESTRICTED_HOOK(android_rvh_cpu_overutilized, 136 TP_PROTO(int cpu, int *overutilized), 137 TP_ARGS(cpu, overutilized), 1); 138 139 DECLARE_RESTRICTED_HOOK(android_rvh_sched_setaffinity, 140 TP_PROTO(struct task_struct *p, const struct cpumask *in_mask, int *retval), 141 TP_ARGS(p, in_mask, retval), 1); 142 143 DECLARE_RESTRICTED_HOOK(android_rvh_sched_getaffinity, 144 TP_PROTO(struct task_struct *p, struct cpumask *in_mask), 145 TP_ARGS(p, in_mask), 1); 146 147 DECLARE_RESTRICTED_HOOK(android_rvh_set_task_cpu, 148 TP_PROTO(struct task_struct *p, unsigned int new_cpu), 149 TP_ARGS(p, new_cpu), 1); 150 151 DECLARE_RESTRICTED_HOOK(android_rvh_try_to_wake_up, 152 TP_PROTO(struct task_struct *p), 153 TP_ARGS(p), 1); 154 155 DECLARE_RESTRICTED_HOOK(android_rvh_try_to_wake_up_success, 156 TP_PROTO(struct task_struct *p), 157 TP_ARGS(p), 1); 158 159 DECLARE_RESTRICTED_HOOK(android_rvh_sched_fork, 160 TP_PROTO(struct task_struct *p), 161 TP_ARGS(p), 1); 162 163 DECLARE_RESTRICTED_HOOK(android_rvh_wake_up_new_task, 164 TP_PROTO(struct task_struct *p), 165 TP_ARGS(p), 1); 166 167 DECLARE_RESTRICTED_HOOK(android_rvh_new_task_stats, 168 TP_PROTO(struct task_struct *p), 169 TP_ARGS(p), 1); 170 171 DECLARE_RESTRICTED_HOOK(android_rvh_flush_task, 172 TP_PROTO(struct task_struct *prev), 173 TP_ARGS(prev), 1); 174 175 DECLARE_RESTRICTED_HOOK(android_rvh_tick_entry, 176 TP_PROTO(struct rq *rq), 177 TP_ARGS(rq), 1); 178 179 DECLARE_RESTRICTED_HOOK(android_rvh_schedule, 180 TP_PROTO(struct task_struct *prev, struct task_struct *next, struct rq *rq), 181 TP_ARGS(prev, next, rq), 1); 182 183 DECLARE_RESTRICTED_HOOK(android_rvh_sched_cpu_starting, 184 TP_PROTO(int cpu), 185 TP_ARGS(cpu), 1); 186 187 DECLARE_RESTRICTED_HOOK(android_rvh_sched_cpu_dying, 188 TP_PROTO(int cpu), 189 TP_ARGS(cpu), 1); 190 191 DECLARE_RESTRICTED_HOOK(android_rvh_account_irq, 192 TP_PROTO(struct task_struct *curr, int cpu, s64 delta, bool start), 193 TP_ARGS(curr, cpu, delta, start), 1); 194 195 struct sched_entity; 196 DECLARE_RESTRICTED_HOOK(android_rvh_place_entity, 197 TP_PROTO(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial, u64 *vruntime), 198 TP_ARGS(cfs_rq, se, initial, vruntime), 1); 199 200 DECLARE_RESTRICTED_HOOK(android_rvh_build_perf_domains, 201 TP_PROTO(bool *eas_check), 202 TP_ARGS(eas_check), 1); 203 204 DECLARE_RESTRICTED_HOOK(android_rvh_update_cpu_capacity, 205 TP_PROTO(int cpu, unsigned long *capacity), 206 TP_ARGS(cpu, capacity), 1); 207 208 DECLARE_RESTRICTED_HOOK(android_rvh_update_misfit_status, 209 TP_PROTO(struct task_struct *p, struct rq *rq, bool *need_update), 210 TP_ARGS(p, rq, need_update), 1); 211 212 struct cpuset; 213 DECLARE_RESTRICTED_HOOK(android_rvh_update_cpus_allowed, 214 TP_PROTO(struct task_struct *p, struct cpuset *cs, 215 const struct cpumask *new_mask, int *ret), 216 TP_ARGS(p, cs, new_mask, ret), 1); 217 218 DECLARE_RESTRICTED_HOOK(android_rvh_sched_fork_init, 219 TP_PROTO(struct task_struct *p), 220 TP_ARGS(p), 1); 221 222 DECLARE_RESTRICTED_HOOK(android_rvh_ttwu_cond, 223 TP_PROTO(int cpu, bool *cond), 224 TP_ARGS(cpu, cond), 1); 225 226 DECLARE_RESTRICTED_HOOK(android_rvh_schedule_bug, 227 TP_PROTO(void *unused), 228 TP_ARGS(unused), 1); 229 230 DECLARE_RESTRICTED_HOOK(android_rvh_sched_exec, 231 TP_PROTO(bool *cond), 232 TP_ARGS(cond), 1); 233 234 DECLARE_HOOK(android_vh_build_sched_domains, 235 TP_PROTO(bool has_asym), 236 TP_ARGS(has_asym)); 237 238 DECLARE_RESTRICTED_HOOK(android_rvh_check_preempt_tick, 239 TP_PROTO(struct task_struct *p, unsigned long *ideal_runtime, bool *skip_preempt, 240 unsigned long delta_exec, struct cfs_rq *cfs_rq, struct sched_entity *curr, 241 unsigned int granularity), 242 TP_ARGS(p, ideal_runtime, skip_preempt, delta_exec, cfs_rq, curr, granularity), 1); 243 244 DECLARE_RESTRICTED_HOOK(android_rvh_check_preempt_wakeup_ignore, 245 TP_PROTO(struct task_struct *p, bool *ignore), 246 TP_ARGS(p, ignore), 1); 247 248 DECLARE_RESTRICTED_HOOK(android_rvh_sched_balance_rt, 249 TP_PROTO(struct rq *rq, struct task_struct *p, int *done), 250 TP_ARGS(rq, p, done), 1); 251 252 DECLARE_RESTRICTED_HOOK(android_rvh_check_preempt_wakeup_fair, 253 TP_PROTO(struct rq *rq, struct task_struct *p, bool *preempt, bool *nopreempt, 254 int wake_flags, struct sched_entity *se, struct sched_entity *pse), 255 TP_ARGS(rq, p, preempt, nopreempt, wake_flags, se, pse), 1); 256 257 DECLARE_RESTRICTED_HOOK(android_rvh_update_deadline, 258 TP_PROTO(struct cfs_rq *cfs_rq, struct sched_entity *se, bool *skip_preempt), 259 TP_ARGS(cfs_rq, se, skip_preempt), 1); 260 261 DECLARE_RESTRICTED_HOOK(android_rvh_set_cpus_allowed_by_task, 262 TP_PROTO(const struct cpumask *cpu_valid_mask, const struct cpumask *new_mask, 263 struct task_struct *p, unsigned int *dest_cpu), 264 TP_ARGS(cpu_valid_mask, new_mask, p, dest_cpu), 1); 265 266 DECLARE_RESTRICTED_HOOK(android_rvh_do_sched_yield, 267 TP_PROTO(struct rq *rq), 268 TP_ARGS(rq), 1); 269 270 DECLARE_RESTRICTED_HOOK(android_rvh_before_do_sched_yield, 271 TP_PROTO(long *skip), 272 TP_ARGS(skip), 1); 273 274 DECLARE_HOOK(android_vh_free_task, 275 TP_PROTO(struct task_struct *p), 276 TP_ARGS(p)); 277 278 DECLARE_HOOK(android_vh_irqtime_account_process_tick, 279 TP_PROTO(struct task_struct *p, struct rq *rq, int user_tick, int ticks), 280 TP_ARGS(p, rq, user_tick, ticks)); 281 282 DECLARE_HOOK(android_vh_copy_process, 283 TP_PROTO(struct task_struct *p, int nr_threads), 284 TP_ARGS(p, nr_threads)); 285 286 287 enum uclamp_id; 288 struct uclamp_se; 289 DECLARE_RESTRICTED_HOOK(android_rvh_uclamp_eff_get, 290 TP_PROTO(struct task_struct *p, enum uclamp_id clamp_id, 291 struct uclamp_se *uclamp_max, struct uclamp_se *uclamp_eff, int *ret), 292 TP_ARGS(p, clamp_id, uclamp_max, uclamp_eff, ret), 1); 293 294 DECLARE_RESTRICTED_HOOK(android_rvh_after_enqueue_task, 295 TP_PROTO(struct rq *rq, struct task_struct *p, int flags), 296 TP_ARGS(rq, p, flags), 1); 297 298 DECLARE_RESTRICTED_HOOK(android_rvh_after_dequeue_task, 299 TP_PROTO(struct rq *rq, struct task_struct *p, int flags, bool *dequeue_task_result), 300 TP_ARGS(rq, p, flags, dequeue_task_result), 1); 301 302 struct cfs_rq; 303 struct sched_entity; 304 struct rq_flags; 305 DECLARE_RESTRICTED_HOOK(android_rvh_enqueue_entity, 306 TP_PROTO(struct cfs_rq *cfs, struct sched_entity *se), 307 TP_ARGS(cfs, se), 1); 308 309 DECLARE_RESTRICTED_HOOK(android_rvh_dequeue_entity, 310 TP_PROTO(struct cfs_rq *cfs, struct sched_entity *se), 311 TP_ARGS(cfs, se), 1); 312 313 DECLARE_RESTRICTED_HOOK(android_rvh_entity_tick, 314 TP_PROTO(struct cfs_rq *cfs_rq, struct sched_entity *se), 315 TP_ARGS(cfs_rq, se), 1); 316 317 DECLARE_RESTRICTED_HOOK(android_rvh_enqueue_task_fair, 318 TP_PROTO(struct rq *rq, struct task_struct *p, int flags), 319 TP_ARGS(rq, p, flags), 1); 320 321 DECLARE_RESTRICTED_HOOK(android_rvh_dequeue_task_fair, 322 TP_PROTO(struct rq *rq, struct task_struct *p, int flags), 323 TP_ARGS(rq, p, flags), 1); 324 325 DECLARE_RESTRICTED_HOOK(android_rvh_util_est_update, 326 TP_PROTO(struct cfs_rq *cfs_rq, struct task_struct *p, bool task_sleep, int *ret), 327 TP_ARGS(cfs_rq, p, task_sleep, ret), 1); 328 329 DECLARE_HOOK(android_vh_setscheduler_uclamp, 330 TP_PROTO(struct task_struct *tsk, int clamp_id, unsigned int value), 331 TP_ARGS(tsk, clamp_id, value)); 332 333 DECLARE_HOOK(android_vh_uclamp_validate, 334 TP_PROTO(struct task_struct *p, const struct sched_attr *attr, 335 int *ret, bool *done), 336 TP_ARGS(p, attr, ret, done)); 337 338 DECLARE_HOOK(android_vh_update_topology_flags_workfn, 339 TP_PROTO(void *unused), 340 TP_ARGS(unused)); 341 342 DECLARE_RESTRICTED_HOOK(android_rvh_update_thermal_stats, 343 TP_PROTO(int cpu), 344 TP_ARGS(cpu), 1); 345 346 DECLARE_HOOK(android_vh_do_wake_up_sync, 347 TP_PROTO(struct wait_queue_head *wq_head, int *done, struct sock *sk), 348 TP_ARGS(wq_head, done, sk)); 349 350 DECLARE_HOOK(android_vh_set_wake_flags, 351 TP_PROTO(int *wake_flags, unsigned int *mode), 352 TP_ARGS(wake_flags, mode)); 353 354 DECLARE_RESTRICTED_HOOK(android_rvh_find_new_ilb, 355 TP_PROTO(struct cpumask *nohz_idle_cpus_mask, int *new_ilb), 356 TP_ARGS(nohz_idle_cpus_mask, new_ilb), 1); 357 358 DECLARE_RESTRICTED_HOOK(android_rvh_cpu_util_cfs_boost, 359 TP_PROTO(int cpu, unsigned long *util), 360 TP_ARGS(cpu, util), 1); 361 362 DECLARE_HOOK(android_vh_dup_task_struct, 363 TP_PROTO(struct task_struct *tsk, struct task_struct *orig), 364 TP_ARGS(tsk, orig)); 365 366 DECLARE_RESTRICTED_HOOK(android_rvh_find_energy_efficient_cpu, 367 TP_PROTO(struct task_struct *p, int prev_cpu, int sync, int *new_cpu), 368 TP_ARGS(p, prev_cpu, sync, new_cpu), 1); 369 370 DECLARE_HOOK(android_vh_sched_pelt_multiplier, 371 TP_PROTO(unsigned int old, unsigned int cur, int *ret), 372 TP_ARGS(old, cur, ret)); 373 374 DECLARE_RESTRICTED_HOOK(android_rvh_post_init_entity_util_avg, 375 TP_PROTO(struct sched_entity *se), 376 TP_ARGS(se), 1); 377 378 DECLARE_RESTRICTED_HOOK(android_rvh_attach_entity_load_avg, 379 TP_PROTO(struct cfs_rq *cfs_rq, struct sched_entity *se), 380 TP_ARGS(cfs_rq, se), 1); 381 382 DECLARE_RESTRICTED_HOOK(android_rvh_detach_entity_load_avg, 383 TP_PROTO(struct cfs_rq *cfs_rq, struct sched_entity *se), 384 TP_ARGS(cfs_rq, se), 1); 385 386 DECLARE_RESTRICTED_HOOK(android_rvh_update_load_avg, 387 TP_PROTO(u64 now, struct cfs_rq *cfs_rq, struct sched_entity *se), 388 TP_ARGS(now, cfs_rq, se), 1); 389 390 DECLARE_RESTRICTED_HOOK(android_rvh_remove_entity_load_avg, 391 TP_PROTO(struct cfs_rq *cfs_rq, struct sched_entity *se), 392 TP_ARGS(cfs_rq, se), 1); 393 394 DECLARE_RESTRICTED_HOOK(android_rvh_before_pick_task_fair, 395 TP_PROTO(struct rq *rq, struct task_struct **p, 396 struct task_struct *prev, struct rq_flags *rf), 397 TP_ARGS(rq, p, prev, rf), 1); 398 399 DECLARE_RESTRICTED_HOOK(android_rvh_balance_fair, 400 TP_PROTO(struct rq *rq, struct task_struct *prev, struct rq_flags *rf), 401 TP_ARGS(rq, prev, rf), 1); 402 403 struct affinity_context; 404 DECLARE_RESTRICTED_HOOK(android_rvh_set_cpus_allowed_ptr, 405 TP_PROTO(struct task_struct *p, struct affinity_context *ctx, bool *skip_user_ptr), 406 TP_ARGS(p, ctx, skip_user_ptr), 1); 407 408 DECLARE_RESTRICTED_HOOK(android_rvh_update_blocked_fair, 409 TP_PROTO(struct rq *rq), 410 TP_ARGS(rq), 1); 411 412 DECLARE_RESTRICTED_HOOK(android_rvh_set_task_comm, 413 TP_PROTO(struct task_struct *tsk, bool exec), 414 TP_ARGS(tsk, exec), 1); 415 416 DECLARE_HOOK(android_vh_task_should_scx, 417 TP_PROTO(int *should_scx, int policy, int prio), 418 TP_ARGS(should_scx, policy, prio)); 419 DECLARE_HOOK(android_vh_scx_ops_consider_migration, 420 TP_PROTO(bool *consider_migration), 421 TP_ARGS(consider_migration)); 422 DECLARE_HOOK(android_vh_scx_fix_prev_slice, 423 TP_PROTO(struct task_struct *p), 424 TP_ARGS(p)); 425 DECLARE_HOOK(android_vh_scx_ops_enable_state, 426 TP_PROTO(int state), 427 TP_ARGS(state)); 428 DECLARE_HOOK(android_vh_scx_enabled, 429 TP_PROTO(int enabled), 430 TP_ARGS(enabled)); 431 DECLARE_HOOK(android_vh_scx_set_cpus_allowed, 432 TP_PROTO(struct task_struct *p, struct affinity_context *ac, int *done), 433 TP_ARGS(p, ac, done)); 434 DECLARE_HOOK(android_vh_scx_task_switch_finish, 435 TP_PROTO(struct task_struct *p, int enable), 436 TP_ARGS(p, enable)); 437 438 DECLARE_HOOK(android_vh_switching_to_scx, 439 TP_PROTO(struct rq *rq, struct task_struct *p), 440 TP_ARGS(rq, p)); 441 442 struct sugov_policy; 443 DECLARE_RESTRICTED_HOOK(android_rvh_set_sugov_update, 444 TP_PROTO(struct sugov_policy *sg_policy, unsigned int next_freq, bool *should_update), 445 TP_ARGS(sg_policy, next_freq, should_update), 1); 446 447 DECLARE_RESTRICTED_HOOK(android_rvh_update_rq_clock_pelt, 448 TP_PROTO(struct rq *rq, s64 delta, int *ret), 449 TP_ARGS(rq, delta, ret), 1); 450 451 DECLARE_RESTRICTED_HOOK(android_rvh_update_load_avg_blocked_se, 452 TP_PROTO(u64 now, struct sched_entity *se, int *ret), 453 TP_ARGS(now, se, ret), 1); 454 455 DECLARE_RESTRICTED_HOOK(android_rvh_update_load_avg_se, 456 TP_PROTO(u64 now, struct cfs_rq *cfs_rq, struct sched_entity *se, int *ret), 457 TP_ARGS(now, cfs_rq, se, ret), 1); 458 459 DECLARE_RESTRICTED_HOOK(android_rvh_update_load_avg_cfs_rq, 460 TP_PROTO(u64 now, struct cfs_rq *cfs_rq, int *ret), 461 TP_ARGS(now, cfs_rq, ret), 1); 462 463 DECLARE_RESTRICTED_HOOK(android_rvh_update_rt_rq_load_avg_internal, 464 TP_PROTO(u64 now, struct rq *rq, int running, int *ret), 465 TP_ARGS(now, rq, running, ret), 1); 466 467 DECLARE_HOOK(android_vh_account_task_time, 468 TP_PROTO(struct task_struct *p, struct rq *rq, int user_tick), 469 TP_ARGS(p, rq, user_tick)); 470 471 struct cpufreq_policy; 472 DECLARE_HOOK(android_vh_map_util_freq, 473 TP_PROTO(unsigned long util, unsigned long freq, 474 unsigned long cap, unsigned long *next_freq, struct cpufreq_policy *policy, 475 bool *need_freq_update), 476 TP_ARGS(util, freq, cap, next_freq, policy, need_freq_update)); 477 478 DECLARE_RESTRICTED_HOOK(android_rvh_set_cpus_allowed_comm, 479 TP_PROTO(struct task_struct *p, const struct cpumask *new_mask), 480 TP_ARGS(p, new_mask), 1); 481 482 DECLARE_HOOK(android_vh_sched_setaffinity_early, 483 TP_PROTO(struct task_struct *p, const struct cpumask *new_mask, bool *retval), 484 TP_ARGS(p, new_mask, retval)); 485 486 DECLARE_HOOK(android_vh_reweight_entity, 487 TP_PROTO(struct sched_entity *se, unsigned long *weight), 488 TP_ARGS(se, weight)); 489 490 struct cgroup_subsys_state; 491 DECLARE_HOOK(android_vh_sched_move_task, 492 TP_PROTO(struct task_struct *tsk), 493 TP_ARGS(tsk)); 494 DECLARE_HOOK(android_vh_cpu_cgroup_css_alloc, 495 TP_PROTO(struct task_group *tg, struct cgroup_subsys_state *parent_css), 496 TP_ARGS(tg, parent_css)); 497 DECLARE_HOOK(android_vh_cpu_cgroup_css_alloc_early, 498 TP_PROTO(struct task_group *parent), 499 TP_ARGS(parent)); 500 DECLARE_HOOK(android_vh_cpu_cgroup_css_free, 501 TP_PROTO(struct cgroup_subsys_state *css), 502 TP_ARGS(css)); 503 504 DECLARE_RESTRICTED_HOOK(android_rvh_dequeue_entity_delayed, 505 TP_PROTO(struct cfs_rq *cfs_rq, struct sched_entity *se, bool *delay), 506 TP_ARGS(cfs_rq, se, delay), 1); 507 508 DECLARE_HOOK(android_vh_tick_nohz_idle_stop_tick, 509 TP_PROTO(void *unused), 510 TP_ARGS(unused)); 511 DECLARE_HOOK(android_vh_mmput, 512 TP_PROTO(struct mm_struct *mm), 513 TP_ARGS(mm)); 514 515 DECLARE_HOOK(android_vh_prio_inheritance, 516 TP_PROTO(struct task_struct *p, int *saved_prio, bool *prio_inherited), 517 TP_ARGS(p, saved_prio, prio_inherited)); 518 519 DECLARE_HOOK(android_vh_prio_restore, 520 TP_PROTO(int saved_prio), 521 TP_ARGS(saved_prio)); 522 523 DECLARE_RESTRICTED_HOOK(android_rvh_update_rt_rq_load_avg, 524 TP_PROTO(u64 now, struct rq *rq, struct task_struct *tsk, int running), 525 TP_ARGS(now, rq, tsk, running), 1); 526 527 struct sched_attr; 528 529 DECLARE_HOOK(android_vh_set_sugov_sched_attr, 530 TP_PROTO(struct sched_attr *attr), 531 TP_ARGS(attr)); 532 533 DECLARE_RESTRICTED_HOOK(android_rvh_set_iowait, 534 TP_PROTO(struct task_struct *p, struct rq *rq, int *should_iowait_boost), 535 TP_ARGS(p, rq, should_iowait_boost), 1); 536 537 DECLARE_RESTRICTED_HOOK(android_rvh_util_fits_cpu, 538 TP_PROTO(unsigned long util, unsigned long uclamp_min, unsigned long uclamp_max, 539 int cpu, bool *fits, bool *done), 540 TP_ARGS(util, uclamp_min, uclamp_max, cpu, fits, done), 1); 541 542 struct sched_dl_entity; 543 DECLARE_HOOK(android_vh_dump_dl_server, 544 TP_PROTO(struct sched_dl_entity *dl_se, struct task_struct *p), 545 TP_ARGS(dl_se, p)); 546 547 /* macro versions of hooks are no longer required */ 548 549 #endif /* _TRACE_HOOK_SCHED_H */ 550 /* This part must be outside protection */ 551 #include <trace/define_trace.h> 552