diff options
author | Thomas Fleury <tfleury@nvidia.com> | 2016-06-16 20:31:45 -0400 |
---|---|---|
committer | Vijayakumar Subbu <vsubbu@nvidia.com> | 2016-07-19 02:19:09 -0400 |
commit | f4b77e465648e87b19a7df4bb2a121ac8ac1b851 (patch) | |
tree | 25e5db7e8f16e76985d2a56ad7b8e8573ad1fccd /drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | |
parent | d6efa8fc625fc297b9baa0755407cee1180fbbe6 (diff) |
gpu: nvgpu: process granularity for FECS traces
When processing FECS traces, a hash table is used
to retrieve the 'pid' of the process that created
the channel/TSG. Report process identifer (aka
tgid in kernel) instead of thread identifier (aka
pid) for FECS traces.
Bug 1736423
Change-Id: I54cb9d298b9fe3e1cccdd7145604cd01c5758c9d
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: http://git-master/r/1166501
(cherry picked from commit f7fd1f6d7ad0753b787ec20604a08a1f4882fe6f)
Reviewed-on: http://git-master/r/1168728
(cherry picked from commit 97a62e5b89352fce576f1bca71b38bf2242ff047)
Reviewed-on: http://git-master/r/1177823
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c index 15e645f2..abf1cc55 100644 --- a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | |||
@@ -631,10 +631,14 @@ static int gk20a_fecs_trace_bind_channel(struct gk20a *g, | |||
631 | GK20A_FECS_TRACE_NUM_RECORDS)); | 631 | GK20A_FECS_TRACE_NUM_RECORDS)); |
632 | 632 | ||
633 | gk20a_mem_end(g, mem); | 633 | gk20a_mem_end(g, mem); |
634 | |||
635 | /* pid (process identifier) in user space, corresponds to tgid (thread | ||
636 | * group id) in kernel space. | ||
637 | */ | ||
634 | if (gk20a_is_channel_marked_as_tsg(ch)) | 638 | if (gk20a_is_channel_marked_as_tsg(ch)) |
635 | pid = tsg_gk20a_from_ch(ch)->tgid; | 639 | pid = tsg_gk20a_from_ch(ch)->tgid; |
636 | else | 640 | else |
637 | pid = ch->pid; | 641 | pid = ch->tgid; |
638 | gk20a_fecs_trace_hash_add(g, context_ptr, pid); | 642 | gk20a_fecs_trace_hash_add(g, context_ptr, pid); |
639 | 643 | ||
640 | return 0; | 644 | return 0; |