Re: [gem5-dev] [m5-dev] Review Request: stats: move code that loops over all stats into python
Hi, I'm trying to call a global function implemented in C++ from a function in the Python __init__.py file, how can I do that? Is that a good example that I can follow? Thanks, William -Original Message- From: gem5-dev-boun...@m5sim.org [mailto:gem5-dev-boun...@m5sim.org] On Behalf Of nathan binkert Sent: 06 June 2011 22:07 To: gem5 Developer List Cc: M5 Developer List Subject: Re: [gem5-dev] [m5-dev] Review Request: stats: move code that loops over all stats into python Where in the code is the signal from kill -USR1 handled to dump stats? % grep -nR USR1 src src/sim/init.cc:97:signal(SIGUSR1, dumpStatsHandler); ___ gem5-dev mailing list gem5-dev@m5sim.org http://m5sim.org/mailman/listinfo/gem5-dev -- 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@m5sim.org http://m5sim.org/mailman/listinfo/gem5-dev
Re: [gem5-dev] [m5-dev] Review Request: stats: move code that loops over all stats into python
I'm trying to call a global function implemented in C++ from a function in the Python __init__.py file, how can I do that? Is that a good example that I can follow? Just add your function foo() to src/python/swig/core.i and then you can access it from m5.internal.core.foo() Most of the functions in core.i are examples for you. ___ gem5-dev mailing list gem5-dev@m5sim.org http://m5sim.org/mailman/listinfo/gem5-dev
Re: [gem5-dev] [m5-dev] Review Request: stats: move code that loops over all stats into python
On 12 May 2011, at 04:24, Nathan Binkert wrote: --- This is an automatically generated e-mail. To reply, visit: http://reviews.m5sim.org/r/690/#review1226 --- I guess I should have said something, but there are several more diffs to come down the road. I just wanted to get some out of the way now. By the end, there will be no output code in C++ at all. src/python/m5/stats/__init__.py http://reviews.m5sim.org/r/690/#comment1691 If you have a periodic dumping of stats because of an event and you get a dumpstats from an m5op or from kill -USR1, you don't want to dump twice in the same cycle because stuff just doesn't work well. Where in the code is the signal from kill -USR1 handled to dump stats? - Nathan On 2011-05-10 06:08:36, Nathan Binkert wrote: --- This is an automatically generated e-mail. To reply, visit: http://reviews.m5sim.org/r/690/ --- (Updated 2011-05-10 06:08:36) Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and Nathan Binkert. Summary --- stats: move code that loops over all stats into python Diffs - src/base/SConscript 44f8c2507d85 src/base/statistics.hh 44f8c2507d85 src/base/statistics.cc 44f8c2507d85 src/base/stats/info.hh 44f8c2507d85 src/base/stats/mysql.hh 44f8c2507d85 src/base/stats/mysql.cc 44f8c2507d85 src/base/stats/output.hh 44f8c2507d85 src/base/stats/output.cc 44f8c2507d85 src/base/stats/text.hh 44f8c2507d85 src/base/stats/text.cc 44f8c2507d85 src/base/stats/visit.hh 44f8c2507d85 src/base/stats/visit.cc 44f8c2507d85 src/python/m5/simulate.py 44f8c2507d85 src/python/m5/stats/__init__.py PRE-CREATION src/python/swig/stats.i 44f8c2507d85 Diff: http://reviews.m5sim.org/r/690/diff Testing --- quick regressions pass (though most recently run with review 689 and 691) Thanks, Nathan ___ m5-dev mailing list m5-...@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev ___ gem5-dev mailing list gem5-dev@m5sim.org http://m5sim.org/mailman/listinfo/gem5-dev
Re: [gem5-dev] [m5-dev] Review Request: stats: move code that loops over all stats into python
Where in the code is the signal from kill -USR1 handled to dump stats? % grep -nR USR1 src src/sim/init.cc:97:signal(SIGUSR1, dumpStatsHandler); ___ gem5-dev mailing list gem5-dev@m5sim.org http://m5sim.org/mailman/listinfo/gem5-dev