arch, x86: Delete packet in IntDevice::recvResponse
Review Request #3117 - Created Sept. 16, 2015 and submitted
| Information | |
|---|---|
| Joel Hestness | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 11145:b92a7a451890 --------------------------- arch, x86: Delete packet in IntDevice::recvResponse IntDevice::recvResponse is called from two places in current mainline: (1) the short circuit path of X86ISA::IntDevice::IntMasterPort::sendMessage for atomic mode, and (2) the full request->response path to and from the x86 interrupts device (finally called from MessageMasterPort::recvTimingResp). In the former case, the packet was deleted correctly, but in the latter case, the packet and request leak. To fix the leak, move request and packet deletion into IntDevice inherited class implementations of recvResponse.
Compiled gem5.debug with --without-tcmalloc. Ran x86 FS tests with Valgrind.
Posted (Sept. 16, 2015, 11:16 a.m.)
Seems fine to me.
Posted (Sept. 21, 2015, 12:57 a.m.)
-
src/dev/x86/intdev.hh (Diff revision 1) -
Seems dangerous to do this in a virtual method that looks like the whole point is to override it?
Who is actually allocating the request and packet?
Review request changed
Updated (Sept. 27, 2015, 12:52 p.m.)
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+12 -2) |
Posted (Sept. 28, 2015, 1:39 a.m.)
-
src/dev/x86/i82094aa.hh (Diff revision 2) -
override
-
src/dev/x86/intdev.hh (Diff revision 2) -
This is fine, but what about just making it purely virtual?
Ship It!
