diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-09-14 16:43:24 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-09-20 00:52:56 -0400 |
commit | 3e841d6a37ceddaf8aa224b597ab4927155d226e (patch) | |
tree | d01d87726e0a5e74e85457c1ac38461048712700 /drivers/gpu/nvgpu/include | |
parent | b9082f076087d5420a5d7fe492ffefb2402397cc (diff) |
gpu: nvgpu: Fix kmem debugging
Make the kmem debugging prints much more easily usable. Previously the
prints would only take effect if the full tracking was enabled:
CONFIG_NVGPU_TRACK_MEM_USAGE
However, there are many times when just the debug prints would be nice
to have by simply setting the log mask bit in the log mask.
echo 0x80000 > /sys/kernel/debug/<gpu>/log_mask
Also this change now uses the real nvgpu_log() function instead of the
legacy nvgpu_dbg() function. This makes the logging appear with proper
GPU printing as well.
Change-Id: If545da3d357d38fe8252e7d548c6765b995cd3d7
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1560248
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/kmem.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/kmem.h b/drivers/gpu/nvgpu/include/nvgpu/kmem.h index ff4b7820..db035060 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/kmem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/kmem.h | |||
@@ -185,8 +185,8 @@ void nvgpu_kmem_cache_free(struct nvgpu_kmem_cache *cache, void *ptr); | |||
185 | */ | 185 | */ |
186 | #define nvgpu_vfree(g, addr) __nvgpu_vfree(g, addr) | 186 | #define nvgpu_vfree(g, addr) __nvgpu_vfree(g, addr) |
187 | 187 | ||
188 | #define kmem_dbg(fmt, args...) \ | 188 | #define kmem_dbg(g, fmt, args...) \ |
189 | gk20a_dbg(gpu_dbg_kmem, fmt, ##args) | 189 | nvgpu_log(g, gpu_dbg_kmem, fmt, ##args) |
190 | 190 | ||
191 | /** | 191 | /** |
192 | * nvgpu_kmem_init - Initialize the kmem tracking stuff. | 192 | * nvgpu_kmem_init - Initialize the kmem tracking stuff. |