mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Add a generic profiler
Add a generic profiler based on the channel kickoff profiler. This aims to provide a mechanism to allow engineers to (more) easily profile arbitrary software paths within nvgpu. Usage of this profiler is still primarily through debugfs. Next up is a generic debugfs interface for this profiler in the Linux code. The end goal for this is to profile the recovery code and generate interesting statistics. JIRA NVGPU-5606 Signed-off-by: Alex Waterman <alexw@nvidia.com> Change-Id: I99783ec7e5143855845bde4e98760ff43350456d Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2355319 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -35,6 +35,12 @@
|
||||
#include <nvgpu/vm_area.h>
|
||||
#include <nvgpu/nvgpu_err.h>
|
||||
#include <nvgpu/mc.h>
|
||||
#include <nvgpu/swprofile.h>
|
||||
#include <nvgpu/fifo/swprofile.h>
|
||||
|
||||
static const char *nvgpu_fifo_kickoff_profile_events[] = {
|
||||
NVGPU_FIFO_KICKOFF_PROFILE_EVENTS,
|
||||
};
|
||||
|
||||
void nvgpu_fifo_cleanup_sw_common(struct gk20a *g)
|
||||
{
|
||||
@@ -93,6 +99,9 @@ int nvgpu_fifo_setup_sw_common(struct gk20a *g)
|
||||
nvgpu_mutex_init(&f->deferred_reset_mutex);
|
||||
#endif
|
||||
|
||||
nvgpu_swprofile_initialize(g, &f->kickoff_profiler,
|
||||
nvgpu_fifo_kickoff_profile_events);
|
||||
|
||||
err = nvgpu_channel_setup_sw(g);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "failed to init channel support");
|
||||
|
||||
Reference in New Issue
Block a user