diff --git a/drivers/gpu/nvgpu/common/profiler/profiler.c b/drivers/gpu/nvgpu/common/profiler/profiler.c index 1ff9654eb..6e6e84184 100644 --- a/drivers/gpu/nvgpu/common/profiler/profiler.c +++ b/drivers/gpu/nvgpu/common/profiler/profiler.c @@ -38,7 +38,7 @@ int nvgpu_profiler_alloc(struct gk20a *g, struct nvgpu_profiler_object *prof; *_prof = NULL; - nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg, " "); + nvgpu_log(g, gpu_dbg_prof, " "); prof = nvgpu_kzalloc(g, sizeof(*prof)); if (prof == NULL) { @@ -51,6 +51,9 @@ int nvgpu_profiler_alloc(struct gk20a *g, nvgpu_init_list_node(&prof->prof_obj_entry); nvgpu_list_add(&prof->prof_obj_entry, &g->profiler_objects); + nvgpu_log(g, gpu_dbg_prof, "Allocated profiler handle %u", + prof->prof_handle); + *_prof = prof; return 0; } @@ -59,6 +62,9 @@ void nvgpu_profiler_free(struct nvgpu_profiler_object *prof) { struct gk20a *g = prof->g; + nvgpu_log(g, gpu_dbg_prof, "Free profiler handle %u", + prof->prof_handle); + nvgpu_list_del(&prof->prof_obj_entry); nvgpu_kfree(g, prof); } diff --git a/drivers/gpu/nvgpu/include/nvgpu/log_common.h b/drivers/gpu/nvgpu/include/nvgpu/log_common.h index 215cc65e5..b4f797e50 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/log_common.h +++ b/drivers/gpu/nvgpu/include/nvgpu/log_common.h @@ -66,6 +66,7 @@ enum nvgpu_log_type { #define gpu_dbg_clk_arb BIT(26) /* Clk arbiter debugging. */ #define gpu_dbg_event BIT(27) /* Events to User debugging. */ #define gpu_dbg_vsrv BIT(28) /* server debugging. */ +#define gpu_dbg_prof BIT(29) /* GPU profiler object debugging. */ #define gpu_dbg_mem BIT(31) /* memory accesses; very verbose. */ #define gpu_dbg_device BIT(32) /* Device initialization and querying. */