ANDROID: sched: create trace points for 32bit execve
Module code would like to hold some locks when affinity is being updated for 32 bit task exec. Create pre and post tracepoints in force_compatible_cpus_allowed_ptr() Bug: 187917024 Change-Id: I95bff9f4d5b5d37c1d5440acbd6857d2855c2b43 Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org> Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
This commit is contained in:

committed by
Todd Kjos

parent
79cb255c79
commit
3f5e8b830c
@@ -312,3 +312,5 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_fill_ext_fmtdesc);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_clear_mask_adjust);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_clear_mask_adjust);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_scmi_timeout_sync);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_scmi_timeout_sync);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_new_ilb);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_new_ilb);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_force_compatible_pre);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_force_compatible_post);
|
||||||
|
@@ -370,6 +370,14 @@ DECLARE_RESTRICTED_HOOK(android_rvh_find_new_ilb,
|
|||||||
TP_PROTO(struct cpumask *nohz_idle_cpus_mask, int *ilb),
|
TP_PROTO(struct cpumask *nohz_idle_cpus_mask, int *ilb),
|
||||||
TP_ARGS(nohz_idle_cpus_mask, ilb), 1);
|
TP_ARGS(nohz_idle_cpus_mask, ilb), 1);
|
||||||
|
|
||||||
|
DECLARE_HOOK(android_vh_force_compatible_pre,
|
||||||
|
TP_PROTO(void *unused),
|
||||||
|
TP_ARGS(unused));
|
||||||
|
|
||||||
|
DECLARE_HOOK(android_vh_force_compatible_post,
|
||||||
|
TP_PROTO(void *unused),
|
||||||
|
TP_ARGS(unused));
|
||||||
|
|
||||||
/* macro versions of hooks are no longer required */
|
/* macro versions of hooks are no longer required */
|
||||||
|
|
||||||
#endif /* _TRACE_HOOK_SCHED_H */
|
#endif /* _TRACE_HOOK_SCHED_H */
|
||||||
|
@@ -2103,6 +2103,7 @@ void force_compatible_cpus_allowed_ptr(struct task_struct *p)
|
|||||||
* offlining of the chosen destination CPU, so take the hotplug
|
* offlining of the chosen destination CPU, so take the hotplug
|
||||||
* lock to ensure that the migration succeeds.
|
* lock to ensure that the migration succeeds.
|
||||||
*/
|
*/
|
||||||
|
trace_android_vh_force_compatible_pre(NULL);
|
||||||
cpus_read_lock();
|
cpus_read_lock();
|
||||||
if (!cpumask_available(new_mask))
|
if (!cpumask_available(new_mask))
|
||||||
goto out_set_mask;
|
goto out_set_mask;
|
||||||
@@ -2127,6 +2128,7 @@ out_set_mask:
|
|||||||
WARN_ON(set_cpus_allowed_ptr(p, override_mask));
|
WARN_ON(set_cpus_allowed_ptr(p, override_mask));
|
||||||
out_free_mask:
|
out_free_mask:
|
||||||
cpus_read_unlock();
|
cpus_read_unlock();
|
||||||
|
trace_android_vh_force_compatible_post(NULL);
|
||||||
free_cpumask_var(new_mask);
|
free_cpumask_var(new_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user