mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
ANDROID: mm: Add vendor hook in pagecache_get_page()
Add a vendor hook for pagecache hit/miss and other vendor specific functions. Bug: 174088128 Bug: 172987241 Signed-off-by: Chiawei Wang <chiaweiwang@google.com> Change-Id: Ie9f14a69a86b8ed81de766e44e30f2eba1d9bd84
This commit is contained in:
parent
369de37804
commit
db158b4ae0
|
|
@ -155,3 +155,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_iommu_setup_dma_ops);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_pick_next_entity);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_check_preempt_wakeup);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rmqueue);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_pagecache_get_page);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,10 @@ DECLARE_HOOK(android_vh_rmqueue,
|
|||
unsigned int alloc_flags, int migratetype),
|
||||
TP_ARGS(preferred_zone, zone, order,
|
||||
gfp_flags, alloc_flags, migratetype));
|
||||
|
||||
DECLARE_HOOK(android_vh_pagecache_get_page,
|
||||
TP_PROTO(struct address_space *mapping, pgoff_t index,
|
||||
int fgp_flags, gfp_t gfp_mask, struct page *page),
|
||||
TP_ARGS(mapping, index, fgp_flags, gfp_mask, page));
|
||||
/* macro versions of hooks are no longer required */
|
||||
|
||||
#endif /* _TRACE_HOOK_MM_H */
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@
|
|||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/filemap.h>
|
||||
|
||||
#undef CREATE_TRACE_POINTS
|
||||
#include <trace/hooks/mm.h>
|
||||
|
||||
/*
|
||||
* FIXME: remove all knowledge of the buffer layer from the core VM
|
||||
*/
|
||||
|
|
@ -1799,6 +1802,9 @@ struct page *pagecache_get_page(struct address_space *mapping, pgoff_t index,
|
|||
page = find_get_entry(mapping, index);
|
||||
if (xa_is_value(page))
|
||||
page = NULL;
|
||||
|
||||
trace_android_vh_pagecache_get_page(mapping, index, fgp_flags,
|
||||
gfp_mask, page);
|
||||
if (!page)
|
||||
goto no_page;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user