From d85c7f8f7cad50135463a6fd267d2d9a07ced00a Mon Sep 17 00:00:00 2001 From: Liam Mark Date: Fri, 5 Jun 2015 17:10:00 -0700 Subject: iommu: add ftrace profiling for map and unmap Add ftrace start and end logging for map, iommu_map_sg and unmap in order to facilitate performance testing. Change-Id: I9ddf241ffa6cf519f6abece7b0820640f5ce1975 Signed-off-by: Liam Mark --- include/linux/iommu.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 2d835b7c226d..614363f84b38 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -262,7 +262,12 @@ static inline size_t iommu_map_sg(struct iommu_domain *domain, unsigned long iova, struct scatterlist *sg, unsigned int nents, int prot) { - return domain->ops->map_sg(domain, iova, sg, nents, prot); + size_t ret; + + trace_map_sg_start(iova, nents); + ret = domain->ops->map_sg(domain, iova, sg, nents, prot); + trace_map_sg_end(iova, nents); + return ret; } extern int iommu_dma_supported(struct iommu_domain *domain, struct device *dev, -- cgit v1.2.3