ANDROID: vendor_hook: Add hook in snapshot_refaults()
Provide a vendor hook android_vh_snapshot_refaults to record the refault statistics of WORKINGSET_RESTORE_ANON; Bug: 234214858 Signed-off-by: Bing Han <bing.han@transsion.com> Change-Id: I20eb5ea99bf21fa8ba34b45e87d2ab9e9cdca167
This commit is contained in:

committed by
Treehugger Robot

parent
6b04959511
commit
6b7243da5e
@@ -408,3 +408,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_shrink_node_memcgs);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ra_tuning_max_page);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ra_tuning_max_page);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tune_memcg_scan_type);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tune_memcg_scan_type);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_inactive_is_low);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_inactive_is_low);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_snapshot_refaults);
|
||||||
|
@@ -38,6 +38,9 @@ DECLARE_HOOK(android_vh_inactive_is_low,
|
|||||||
TP_PROTO(unsigned long gb, unsigned long *inactive_ratio,
|
TP_PROTO(unsigned long gb, unsigned long *inactive_ratio,
|
||||||
enum lru_list inactive_lru, bool *skip),
|
enum lru_list inactive_lru, bool *skip),
|
||||||
TP_ARGS(gb, inactive_ratio, inactive_lru, skip));
|
TP_ARGS(gb, inactive_ratio, inactive_lru, skip));
|
||||||
|
DECLARE_HOOK(android_vh_snapshot_refaults,
|
||||||
|
TP_PROTO(struct lruvec *target_lruvec),
|
||||||
|
TP_ARGS(target_lruvec));
|
||||||
#endif /* _TRACE_HOOK_VMSCAN_H */
|
#endif /* _TRACE_HOOK_VMSCAN_H */
|
||||||
/* This part must be outside protection */
|
/* This part must be outside protection */
|
||||||
#include <trace/define_trace.h>
|
#include <trace/define_trace.h>
|
||||||
|
@@ -3085,6 +3085,7 @@ static void snapshot_refaults(struct mem_cgroup *target_memcg, pg_data_t *pgdat)
|
|||||||
target_lruvec->refaults[0] = refaults;
|
target_lruvec->refaults[0] = refaults;
|
||||||
refaults = lruvec_page_state(target_lruvec, WORKINGSET_ACTIVATE_FILE);
|
refaults = lruvec_page_state(target_lruvec, WORKINGSET_ACTIVATE_FILE);
|
||||||
target_lruvec->refaults[1] = refaults;
|
target_lruvec->refaults[1] = refaults;
|
||||||
|
trace_android_vh_snapshot_refaults(target_lruvec);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user