gpu: nvgpu: rename profiler object structure

Rename profiler object structure from struct dbg_profiler_object_data
to struct nvgpu_profiler_object.

Annotate the structure members appropriately.

Bug 2510974

Change-Id: I9454388f8ad143b39daca6bbc2b12511ffa3fd95
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2365675
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Deepak Nibade
2020-04-29 18:04:44 +05:30
committed by Alex Waterman
parent e4e6be85ea
commit d869040d7a
8 changed files with 60 additions and 41 deletions

View File

@@ -33,7 +33,7 @@
struct gk20a;
struct nvgpu_channel;
struct dbg_session_gk20a;
struct dbg_profiler_object_data;
struct nvgpu_profiler_object;
struct nvgpu_channel *
nvgpu_dbg_gpu_get_session_channel(struct dbg_session_gk20a *dbg_s);
@@ -111,12 +111,12 @@ void nvgpu_dbg_gpu_clear_broadcast_stop_trigger(struct nvgpu_channel *ch);
int nvgpu_dbg_set_powergate(struct dbg_session_gk20a *dbg_s, bool disable_powergate);
bool nvgpu_check_and_set_global_reservation(
struct dbg_session_gk20a *dbg_s,
struct dbg_profiler_object_data *prof_obj);
struct nvgpu_profiler_object *prof_obj);
bool nvgpu_check_and_set_context_reservation(
struct dbg_session_gk20a *dbg_s,
struct dbg_profiler_object_data *prof_obj);
struct nvgpu_profiler_object *prof_obj);
void nvgpu_release_profiler_reservation(struct dbg_session_gk20a *dbg_s,
struct dbg_profiler_object_data *prof_obj);
struct nvgpu_profiler_object *prof_obj);
void nvgpu_dbg_session_post_event(struct dbg_session_gk20a *dbg_s);
u32 nvgpu_set_powergate_locked(struct dbg_session_gk20a *dbg_s,

View File

@@ -78,7 +78,7 @@ struct sim_nvgpu;
struct nvgpu_ce_app;
struct gk20a_ctxsw_trace;
struct nvgpu_mem_alloc_tracker;
struct dbg_profiler_object_data;
struct nvgpu_profiler_object;
struct nvgpu_debug_context;
struct nvgpu_clk_pll_debug_data;
struct nvgpu_nvhost_dev;
@@ -437,13 +437,13 @@ struct gpu_ops {
bool disable_powergate);
bool (*check_and_set_global_reservation)(
struct dbg_session_gk20a *dbg_s,
struct dbg_profiler_object_data *prof_obj);
struct nvgpu_profiler_object *prof_obj);
bool (*check_and_set_context_reservation)(
struct dbg_session_gk20a *dbg_s,
struct dbg_profiler_object_data *prof_obj);
struct nvgpu_profiler_object *prof_obj);
void (*release_profiler_reservation)(
struct dbg_session_gk20a *dbg_s,
struct dbg_profiler_object_data *prof_obj);
struct nvgpu_profiler_object *prof_obj);
} debugger;
struct {
void (*enable_membuf)(struct gk20a *g, u32 size,

View File

@@ -30,25 +30,44 @@
struct gk20a;
struct nvgpu_channel;
struct dbg_profiler_object_data {
struct nvgpu_profiler_object {
struct gk20a *g;
/*
* Debug session id. Only valid for profiler objects
* allocated through debug session i.e. in ioctl_dbg.c.
*/
int session_id;
/* Unique profiler object handle. Also used as reservation id. */
u32 prof_handle;
/*
* Pointer to context being profiled, applicable only for profiler
* objects with context scope.
*/
struct nvgpu_tsg *tsg;
/* If profiler object has HWPM reservation. */
bool has_reservation;
/*
* Entry of this object into global list of objects
* maintained in struct gk20a.
*/
struct nvgpu_list_node prof_obj_entry;
};
static inline struct dbg_profiler_object_data *
dbg_profiler_object_data_from_prof_obj_entry(struct nvgpu_list_node *node)
static inline struct nvgpu_profiler_object *
nvgpu_profiler_object_from_prof_obj_entry(struct nvgpu_list_node *node)
{
return (struct dbg_profiler_object_data *)
((uintptr_t)node - offsetof(struct dbg_profiler_object_data, prof_obj_entry));
return (struct nvgpu_profiler_object *)
((uintptr_t)node - offsetof(struct nvgpu_profiler_object, prof_obj_entry));
};
int nvgpu_profiler_alloc(struct gk20a *g,
struct dbg_profiler_object_data **_prof);
void nvgpu_profiler_free(struct dbg_profiler_object_data *prof);
struct nvgpu_profiler_object **_prof);
void nvgpu_profiler_free(struct nvgpu_profiler_object *prof);
#endif /* CONFIG_NVGPU_PROFILER */
#endif /* NVGPU_PROFILER_H */