Re: [gem5-dev] Review Request 3132: misc: Separate stats file is generated for SystemC-gem5 co-simulation

2016-05-31 Thread Andrew Bardsley


> On Nov. 16, 2015, 1:38 p.m., Andreas Hansson wrote:
> > It is not clear to me why this is not just calling the "normal" stats dump. 
> > It seems like an unfortunate amount of code duplication.
> 
> Abdul Mutaal Ahmad wrote:
> It is using the same API as used in util/cxx_config. Even the 
> util/systemc is built on the same code. Since systemC runs need 2 parts, 
> first to generate the config.ini and then run it within systemC. The only 
> thing which seems logical is to use same stats.txt which was used in the 
> first part to generate config.ini. The "normal" stats are calculated through 
> python calls.

The two examples should be developed to share a C++ mechanism for dumping stats 
which should probably then be pushed back into the normal codebase (out of 
util/...). I haven't been following developments in stats and so can't really 
comment on how much Python is still required by them. Both 
util/cxx_config/stats.{cc,hh} and util/systemc/stats.{cc,hh} were offered as 
proof-of-principle examples.

I think the presence of the C++ stats dumping code in this patch takes the 
discussion one step on by offering a usable implementation. It may be that C++ 
and Python-involving stats can't converge but this patch at least provides a 
route for Python-less gem5 users to make use of stats in the same form. I think 
the code offered here still represents a significant improvement on the 
original util/{cxx_config,systemc}/stats.{cpp,h}. (Full disclosure: I've not 
read the cascading dynamic_cast in any detail nor tried running it)


- Andrew


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3132/#review7598
---


On May 30, 2016, 9:37 a.m., Abdul Mutaal Ahmad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3132/
> ---
> 
> (Updated May 30, 2016, 9:37 a.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> In previous versions of systemC-gem5 coupling statistics were not updated for 
> the systemc-gem5 simulation. systemC-gem5 simulation only need the previously 
> built config.ini file and normal gem5 simulation has to be run once to 
> generate config.ini file. Thus stats.txt inside the m5out folder is redundant 
> for systemC-gem5 simulation. A new stats file is now generated with the all 
> the statistics for systemC-gem5 simulation. This will also resolve the stats 
> issue in tlm-sysmtemC simulation.
> 
> 
> Diffs
> -
> 
>   util/systemc/main.cc UNKNOWN 
>   util/systemc/stats.hh UNKNOWN 
>   util/systemc/stats.cc UNKNOWN 
>   util/tlm/main.cc UNKNOWN 
> 
> Diff: http://reviews.gem5.org/r/3132/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Abdul Mutaal Ahmad
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3132: misc: Separate stats file is generated for SystemC-gem5 co-simulation

2016-05-30 Thread Matthias Jung

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3132/#review8384
---

Ship it!


Ship It!

- Matthias Jung


On Mai 30, 2016, 9:37 vorm., Abdul Mutaal Ahmad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3132/
> ---
> 
> (Updated Mai 30, 2016, 9:37 vorm.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> In previous versions of systemC-gem5 coupling statistics were not updated for 
> the systemc-gem5 simulation. systemC-gem5 simulation only need the previously 
> built config.ini file and normal gem5 simulation has to be run once to 
> generate config.ini file. Thus stats.txt inside the m5out folder is redundant 
> for systemC-gem5 simulation. A new stats file is now generated with the all 
> the statistics for systemC-gem5 simulation. This will also resolve the stats 
> issue in tlm-sysmtemC simulation.
> 
> 
> Diffs
> -
> 
>   util/systemc/main.cc UNKNOWN 
>   util/systemc/stats.hh UNKNOWN 
>   util/systemc/stats.cc UNKNOWN 
>   util/tlm/main.cc UNKNOWN 
> 
> Diff: http://reviews.gem5.org/r/3132/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Abdul Mutaal Ahmad
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3132: misc: Separate stats file is generated for SystemC-gem5 co-simulation

2016-05-19 Thread Andrew Bardsley

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3132/#review8323
---

Ship it!


Caveat: make the filename/configuration for stats output visible in the 
top-level main.cc.

- Andrew Bardsley


On Oct. 16, 2015, 1:46 p.m., Abdul Mutaal Ahmad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3132/
> ---
> 
> (Updated Oct. 16, 2015, 1:46 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> In previous versions of systemC-gem5 coupling statistics were not updated for 
> the systemc-gem5 simulation. systemC-gem5 simulation only need the previously 
> built config.ini file and normal gem5 simulation has to be run once to 
> generate config.ini file. Thus stats.txt inside the m5out folder is redundant 
> for systemC-gem5 simulation. A new stats file is now generated with the all 
> the statistics for systemC-gem5 simulation. This will also resolve the stats 
> issue in tlm-sysmtemC simulation.
> 
> 
> Diffs
> -
> 
>   util/systemc/stats.hh UNKNOWN 
>   util/systemc/stats.cc UNKNOWN 
>   util/tlm/main.cc UNKNOWN 
>   util/systemc/main.cc UNKNOWN 
> 
> Diff: http://reviews.gem5.org/r/3132/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Abdul Mutaal Ahmad
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3132: misc: Separate stats file is generated for SystemC-gem5 co-simulation

2016-05-19 Thread Andrew Bardsley


> On Oct. 16, 2015, 3:15 p.m., Nilay Vaish wrote:
> > util/systemc/stats.cc, line 79
> > 
> >
> > The file name can be kept as constant, but at least pass an argument to 
> > this function that specifies the file path.
> > I would prefer if you use the same output directory that the rest of 
> > the system is using.
> 
> Abdul Mutaal Ahmad wrote:
> are you suggesting to use OutputDirectory class and get the current 
> directory create a stats file there. As far as I know the current management 
> of stats is wrapped inside the python calls
> 
> Nilay Vaish wrote:
> Forget about using the OutputDirectory class for the time being.  Is it 
> at all possible for statsDump
> to receive a file path in which statistics are going to be dumped?  I 
> would not assume that m5out 
> directory is present in cwd.
> 
> Abdul Mutaal Ahmad wrote:
> It is possible but that will eventually need some changes in 
> statistics.cc/statistics.hh . statsDump and statsReset are handlers and they 
> are registered with statistics using registerHandlers defined in 
> statistics.hh. I don't think it's a good solution beacuse it will disturb the 
> python calls for normal gem5 run.

As the whole contents of util/systemc is intended to be just an example of how 
to construct a top level to use the .ini loading mechanism within a 'foreign' 
SystemC simulation, I'd suggest passing a filename down from main.cc as it's 
not unlikely that the user of this example would have their own, application 
specific, ideas about where the stats file should end up that doesn't sensibly 
involve reusing any of the Python mechanisms.

Perhaps add a global string variable to stats.{hh,cc} in the first instance and 
set it from main.cc (to make the point about that the files other than main.cc 
should be progressing towards being a SystemC interfacing library with main.cc 
as a user of that library).

Looking at the registerHandlers mechanism. I think perhaps that should be 
changed to use a 'DumpOperations' class. An object of a derived class of 
DumpOperations can then be registered with registerHandlers.  Call made on that 
object to reset/dump stats can then be made rather than on raw function 
pointers (mea culpa (I think)). With an object handling stats dumping, local 
data could then be held (including a filename). Maybe that should be a second 
step in another patch?


- Andrew


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3132/#review7382
---


On Oct. 16, 2015, 1:46 p.m., Abdul Mutaal Ahmad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3132/
> ---
> 
> (Updated Oct. 16, 2015, 1:46 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> In previous versions of systemC-gem5 coupling statistics were not updated for 
> the systemc-gem5 simulation. systemC-gem5 simulation only need the previously 
> built config.ini file and normal gem5 simulation has to be run once to 
> generate config.ini file. Thus stats.txt inside the m5out folder is redundant 
> for systemC-gem5 simulation. A new stats file is now generated with the all 
> the statistics for systemC-gem5 simulation. This will also resolve the stats 
> issue in tlm-sysmtemC simulation.
> 
> 
> Diffs
> -
> 
>   util/systemc/stats.hh UNKNOWN 
>   util/systemc/stats.cc UNKNOWN 
>   util/tlm/main.cc UNKNOWN 
>   util/systemc/main.cc UNKNOWN 
> 
> Diff: http://reviews.gem5.org/r/3132/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Abdul Mutaal Ahmad
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3132: misc: Separate stats file is generated for SystemC-gem5 co-simulation

2015-12-01 Thread Nilay Vaish


> On Oct. 16, 2015, 3:15 p.m., Nilay Vaish wrote:
> > util/systemc/stats.cc, line 79
> > 
> >
> > The file name can be kept as constant, but at least pass an argument to 
> > this function that specifies the file path.
> > I would prefer if you use the same output directory that the rest of 
> > the system is using.
> 
> Abdul Mutaal Ahmad wrote:
> are you suggesting to use OutputDirectory class and get the current 
> directory create a stats file there. As far as I know the current management 
> of stats is wrapped inside the python calls

Forget about using the OutputDirectory class for the time being.  Is it at all 
possible for statsDump
to receive a file path in which statistics are going to be dumped?  I would not 
assume that m5out 
directory is present in cwd.


- Nilay


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3132/#review7382
---


On Oct. 16, 2015, 1:46 p.m., Abdul Mutaal Ahmad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3132/
> ---
> 
> (Updated Oct. 16, 2015, 1:46 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> In previous versions of systemC-gem5 coupling statistics were not updated for 
> the systemc-gem5 simulation. systemC-gem5 simulation only need the previously 
> built config.ini file and normal gem5 simulation has to be run once to 
> generate config.ini file. Thus stats.txt inside the m5out folder is redundant 
> for systemC-gem5 simulation. A new stats file is now generated with the all 
> the statistics for systemC-gem5 simulation. This will also resolve the stats 
> issue in tlm-sysmtemC simulation.
> 
> 
> Diffs
> -
> 
>   util/systemc/stats.hh UNKNOWN 
>   util/systemc/stats.cc UNKNOWN 
>   util/tlm/main.cc UNKNOWN 
>   util/systemc/main.cc UNKNOWN 
> 
> Diff: http://reviews.gem5.org/r/3132/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Abdul Mutaal Ahmad
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3132: misc: Separate stats file is generated for SystemC-gem5 co-simulation

2015-11-16 Thread Andreas Hansson

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3132/#review7598
---


It is not clear to me why this is not just calling the "normal" stats dump. It 
seems like an unfortunate amount of code duplication.

- Andreas Hansson


On Oct. 16, 2015, 1:46 p.m., Abdul Mutaal Ahmad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3132/
> ---
> 
> (Updated Oct. 16, 2015, 1:46 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> In previous versions of systemC-gem5 coupling statistics were not updated for 
> the systemc-gem5 simulation. systemC-gem5 simulation only need the previously 
> built config.ini file and normal gem5 simulation has to be run once to 
> generate config.ini file. Thus stats.txt inside the m5out folder is redundant 
> for systemC-gem5 simulation. A new stats file is now generated with the all 
> the statistics for systemC-gem5 simulation. This will also resolve the stats 
> issue in tlm-sysmtemC simulation.
> 
> 
> Diffs
> -
> 
>   util/systemc/stats.hh UNKNOWN 
>   util/systemc/stats.cc UNKNOWN 
>   util/tlm/main.cc UNKNOWN 
>   util/systemc/main.cc UNKNOWN 
> 
> Diff: http://reviews.gem5.org/r/3132/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Abdul Mutaal Ahmad
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3132: misc: Separate stats file is generated for SystemC-gem5 co-simulation

2015-10-14 Thread Nilay Vaish


> On Oct. 14, 2015, 2:02 a.m., Nilay Vaish wrote:
> > Format this patch again.  Read the following page: 
> > http://gem5.org/Submitting_Contributions

Several lines are more than 80 characters. Also make sure that
the identation is correct.


- Nilay


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3132/#review7369
---


On Sept. 25, 2015, 3:16 p.m., Abdul Mutaal Ahmad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3132/
> ---
> 
> (Updated Sept. 25, 2015, 3:16 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> In previous versions of systemC-gem5 coupling statistics were not updated for 
> the systemc-gem5 simulation. systemC-gem5 simulation only need the previously 
> built config.ini file and normal gem5 simulation has to be run once to 
> generate config.ini file. Thus stats.txt inside the m5out folder is redundant 
> for systemC-gem5 simulation. A new stats file is now generated with the all 
> the statistics for systemC-gem5 simulation. This will also resolve the stats 
> issue in tlm-sysmtemC simulation.
> 
> 
> Diffs
> -
> 
>   util/systemc/main.cc UNKNOWN 
>   util/systemc/stats.hh UNKNOWN 
>   util/systemc/stats.cc UNKNOWN 
>   util/tlm/main.cc UNKNOWN 
> 
> Diff: http://reviews.gem5.org/r/3132/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Abdul Mutaal Ahmad
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3132: misc: Separate stats file is generated for SystemC-gem5 co-simulation

2015-10-13 Thread Nilay Vaish

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3132/#review7369
---


Format this patch again.  Read the following page: 
http://gem5.org/Submitting_Contributions

- Nilay Vaish


On Sept. 25, 2015, 3:16 p.m., Abdul Mutaal Ahmad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3132/
> ---
> 
> (Updated Sept. 25, 2015, 3:16 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> In previous versions of systemC-gem5 coupling statistics were not updated for 
> the systemc-gem5 simulation. systemC-gem5 simulation only need the previously 
> built config.ini file and normal gem5 simulation has to be run once to 
> generate config.ini file. Thus stats.txt inside the m5out folder is redundant 
> for systemC-gem5 simulation. A new stats file is now generated with the all 
> the statistics for systemC-gem5 simulation. This will also resolve the stats 
> issue in tlm-sysmtemC simulation.
> 
> 
> Diffs
> -
> 
>   util/systemc/main.cc UNKNOWN 
>   util/systemc/stats.hh UNKNOWN 
>   util/systemc/stats.cc UNKNOWN 
>   util/tlm/main.cc UNKNOWN 
> 
> Diff: http://reviews.gem5.org/r/3132/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Abdul Mutaal Ahmad
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3132: misc: Separate stats file is generated for SystemC-gem5 co-simulation

2015-10-07 Thread Matthias Jung

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/3132/#review7334
---

Ship it!


Ship It!

- Matthias Jung


On Sept. 25, 2015, 3:16 nachm., Abdul Mutaal Ahmad wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3132/
> ---
> 
> (Updated Sept. 25, 2015, 3:16 nachm.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> In previous versions of systemC-gem5 coupling statistics were not updated for 
> the systemc-gem5 simulation. systemC-gem5 simulation only need the previously 
> built config.ini file and normal gem5 simulation has to be run once to 
> generate config.ini file. Thus stats.txt inside the m5out folder is redundant 
> for systemC-gem5 simulation. A new stats file is now generated with the all 
> the statistics for systemC-gem5 simulation. This will also resolve the stats 
> issue in tlm-sysmtemC simulation.
> 
> 
> Diffs
> -
> 
>   util/systemc/main.cc UNKNOWN 
>   util/systemc/stats.hh UNKNOWN 
>   util/systemc/stats.cc UNKNOWN 
>   util/tlm/main.cc UNKNOWN 
> 
> Diff: http://reviews.gem5.org/r/3132/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Abdul Mutaal Ahmad
> 
>

___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev