Hi Andreas,

Good question. I don't see any reason why we couldn't reverse the order in
simulate.py (
https://gem5.googlesource.com/public/gem5/+/master/src/python/m5/simulate.py#155).
TBH, I'm not sure it's really appropriate to have the stats dump like that
anyway. I'd rather see explicit calls via python to m5.dumpStats().

At the same time, I think the current order should be OK. While the exit
callbacks are meant to clean up some state (e.g., close open files), they
shouldn't delete any objects that might have stats. Unless I'm missing
something.

Cheers,
Jason

On Fri, Oct 12, 2018 at 7:32 AM Andreas Sandberg <andreas.sandb...@arm.com>
wrote:

> Hi Everyone,
>
> Does anyone know why src/python/m5/simulate.py sets up atexit handlers
> that request a stat dump after calling the exit callbacks in C++?
>
> This seems very strange since I would typically use the exit cleanups to
> perform model-specific cleanup. I wouldn't expect any calls into the
> SimObject after receiving the exit callback.
>
> Cheers,
> Andreas
>
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
> _______________________________________________
> gem5-dev mailing list
> gem5-dev@gem5.org
> http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to