Snap for 9122616 from 8f42d066aa to android-mainline-keystone-qcom-release

Change-Id: Icd954168b28744d1736556e3754b7330de0574e7
This commit is contained in:
Android Build Coastguard Worker 2022-09-30 00:00:22 +00:00
commit e75fa7a506
3 changed files with 24 additions and 0 deletions

View File

@ -37,6 +37,7 @@
#include <trace/hooks/syscall_check.h>
#include <trace/hooks/remoteproc.h>
#include <trace/hooks/hung_task.h>
#include <trace/hooks/timer.h>
/*
* Export tracepoints that act as a bare tracehook (ie: have no trace event
@ -109,3 +110,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery_set);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_uninterruptible_tasks);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_uninterruptible_tasks_dn);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_timer_calc_index);

View File

@ -0,0 +1,19 @@
/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM timer
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_TIMER_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_TIMER_H
#include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>
DECLARE_HOOK(android_vh_timer_calc_index,
TP_PROTO(unsigned int lvl, unsigned long *expires),
TP_ARGS(lvl, expires));
#endif /* _TRACE_HOOK_TIMER_H */
/* This part must be outside protection */
#include <trace/define_trace.h>

View File

@ -56,6 +56,8 @@
#define CREATE_TRACE_POINTS
#include <trace/events/timer.h>
#undef CREATE_TRACE_POINTS
#include <trace/hooks/timer.h>
__visible u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
@ -525,6 +527,7 @@ static inline unsigned calc_index(unsigned long expires, unsigned lvl,
*
* Round up with level granularity to prevent this.
*/
trace_android_vh_timer_calc_index(lvl, &expires);
expires = (expires >> LVL_SHIFT(lvl)) + 1;
*bucket_expiry = expires << LVL_SHIFT(lvl);
return LVL_OFFS(lvl) + (expires & LVL_MASK);