msm: camera: smmu: Profile time taken for map, unmap

Add debugging capability to profile ion alloc,
smmu map and unmap calls. Enable below debugfs settings
to get the traces with corresponding latencies.
Alloc      : echo 1 > /sys/kernel/debug/camera_memmgr/alloc_profile_enable
Map, Unmap : echo 1 > /sys/kernel/debug/camera_smmu/map_profile_enable
Capture the profiling numbers in traces.

CRs-Fixed: 2538876
Change-Id: I92dc58416a9febc77a7836b8f7b1523b547c128f
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
This commit is contained in:
Pavan Kumar Chilamkurthi
2020-04-16 20:28:26 -07:00
parent d324acfbdb
commit 1b644126dd
4 changed files with 108 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
*/
#ifndef _CAM_MEM_MGR_H_
@@ -65,12 +65,16 @@ struct cam_mem_buf_queue {
* @bitmap: bitmap of the mem mgr utility
* @bits: max bits of the utility
* @bufq: array of buffers
* @dentry: Debugfs entry
* @alloc_profile_enable: Whether to enable alloc profiling
*/
struct cam_mem_table {
struct mutex m_lock;
void *bitmap;
size_t bits;
struct cam_mem_buf_queue bufq[CAM_MEM_BUFQ_MAX];
struct dentry *dentry;
bool alloc_profile_enable;
};
/**