diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index ea43e294aa3e..964d510caa75 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -152,6 +152,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mem_cgroup_alloc); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cma_alloc_bypass); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_isolate_freepages); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_oom_check_panic); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_adjust_alloc_flags); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_wait_for_work); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_oem_binder_struct); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_transaction_received); diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index a6e6068506c0..03ff114098f6 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -921,6 +921,7 @@ static struct page **__iommu_dma_alloc_pages(struct device *dev, order_size = 1U << order; if (order_mask > order_size) alloc_flags |= __GFP_NORETRY; + trace_android_vh_adjust_alloc_flags(order, &alloc_flags); page = alloc_pages_node(nid, alloc_flags, order); if (!page) continue; diff --git a/include/trace/hooks/iommu.h b/include/trace/hooks/iommu.h index d965a23c1c92..7afc06e450b9 100644 --- a/include/trace/hooks/iommu.h +++ b/include/trace/hooks/iommu.h @@ -23,6 +23,10 @@ DECLARE_HOOK(android_vh_iommu_iovad_free_iova, TP_PROTO(struct iova_domain *iovad, dma_addr_t iova, size_t size), TP_ARGS(iovad, iova, size)); +DECLARE_HOOK(android_vh_adjust_alloc_flags, + TP_PROTO(unsigned int order, gfp_t *alloc_flags), + TP_ARGS(order, alloc_flags)); + #endif /* _TRACE_HOOK_IOMMU_H */ /* This part must be outside protection */