gpu-compute: Don't track vector store insts in CU's headTailMap
authorTony Gutierrez <anthony.gutierrez@amd.com>
Thu, 28 Mar 2019 01:31:41 +0000 (21:31 -0400)
committerAnthony Gutierrez <anthony.gutierrez@amd.com>
Fri, 17 Jul 2020 16:32:06 +0000 (16:32 +0000)
commitf64ff892123586883872585b6d66d99399531e10
treed147aba4272258cc78e69a9951b33472b574b400
parenta23ef78c916badc006b29480de79aea89bb8953a
gpu-compute: Don't track vector store insts in CU's headTailMap

This change fixes a memory leak due to live GPUDynInstPtr references
to vector store insts being stored in the CU's headTailMap and never
released.

This happened because store insts are not supposed to have their
head-tail latencies tracked by the headTailMap; instead they use
timing information from the GPUCoalescer. When updating the
headTailLatency stat via the headTailMap, only loads were considered
and removed from the headTailMap, however when inserting into the
headTailMap loads and stores were considered, thus leading to the
memory leak.

This change fixes the issue by only adding loads to the headTailMap.

Change-Id: I8a8f5b79f55e00481ae5e82519a9ed627a7ecbd1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29963
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
src/gpu-compute/compute_unit.cc