Hello Gabe Black, Jason Lowe-Power, Nathan Binkert, Curtis Dunham,

I'd like you to reexamine a change. Please visit

    https://gem5-review.googlesource.com/3221

to look at the new patch set (#2).

Change subject: sim: Add hooks to implement event reference counting
......................................................................

sim: Add hooks to implement event reference counting

We currently only support deleting an event if it is triggered and not
re-scheduled. This is fine for most native code. However, there are
cases where Python needs to count references to make sure that the
Python object stays live while the native object is live.

Generalise the mechanism used to implement by adding reference
counting hooks to the event base class:

  * Event::incref()
  * Event::decref()

These calls are used to increase and decrease the reference count of
an object. The default implementation in Event maintains backwards
compatibility with the existing AutoDelete feature by ignoring
incref() and deleting the event on decref() if it isn't scheduled
anymore.

For performance and backwards-compatibility reasons, these methods are
only called when the Managed/AutoDelete flag is set.

Change-Id: I5637984c906a9d44c22780712cf1c521b8297149
Signed-off-by: Andreas Sandberg <[email protected]>
Reviewed-by: Curtis Dunham <[email protected]>
---
M src/sim/eventq.cc
M src/sim/eventq.hh
M src/sim/eventq_impl.hh
3 files changed, 53 insertions(+), 7 deletions(-)


--
To view, visit https://gem5-review.googlesource.com/3221
To unsubscribe, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5637984c906a9d44c22780712cf1c521b8297149
Gerrit-Change-Number: 3221
Gerrit-PatchSet: 2
Gerrit-Owner: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Curtis Dunham <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nathan Binkert <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to