Re: [gem5-dev] Review Request 3802: mem, stats: fix typos in CommMonitor and Stats

2017-02-07 Thread Pierre-Yves Péneau

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

(Updated Feb. 7, 2017, 6:29 p.m.)


Review request for Default.


Repository: gem5


Description (updated)
---

Changeset 11809:e8c2d26050a3
---
mem, stats: fix typos in CommMonitor and Stats

Signed-off-by: Pierre-Yves Péneau 
Reviewed-by: Tony Gutierrez 
Reviewed-by: Jason Lowe-Power 


Diffs
-

  src/base/statistics.hh 63325e5b0a9d 
  src/mem/comm_monitor.hh 63325e5b0a9d 
  src/mem/comm_monitor.cc 63325e5b0a9d 

Diff: http://reviews.gem5.org/r/3802/diff/


Testing
---


Thanks,

Pierre-Yves Péneau

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


Re: [gem5-dev] RISC-V: Unknown opcode 0x00

2017-02-07 Thread Alec Roelke
Hi Everyone,

Does anybody know anything about how gem5 reads binaries and why this
problem might be happening?  If full-system mode for RISC-V is to be
supported in the future (and probably for multithreading in SE mode as
well), this will probably need to be fixed.

Thanks,
Alec Roelke

On Mon, Jan 23, 2017 at 3:12 PM, Alec Roelke  wrote:

> Hello,
>
> I'm trying to get the riscv64-linux-gnu-* tools working on gem5 for RISC-V
> since right now only the riscv64-unknown-elf-* tools are compatible and
> those don't include a lot of Linux headers.
>
> The problem I am encountering is that after returning from a function I
> assume is part of libc (the assembly label is __libc_setup_tls), the next
> instruction it reads is always 0x, which is undefined in RISC-V and
> causes a panic.  For example, when I compile the example "Hello, world"
> program with riscv64-linux-gnu-gcc, using the -static and -static-libgcc
> flags, here is a snippet of the end of the Exec trace:
>
>  @__libc_setup_tls+456: jalr zero, ra, 0   : IntAlu :
>  D=0x0002e2ec
>  @__libc_start_main+140: unknown opcode 0x00: No_OpClass :
>
> The value of ra (return address register, just like in MIPS) in the first
> line is @__libc_start_main+140 (0x2ddc4), which it appears to correctly
> jump to in the second line.  According to the assembly I dumped from the
> binary, that should be an actual instruction (lui a5, 0x12, which loads
> 0x12 into the upper 32 bits of register a5), but gem5 seems to be reading
> 0x.
>
> Does anyone know what's going on?
>
> Thanks,
> Alec Roelke
>
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


[gem5-dev] changeset in gem5: style: Force Python.h to be included before m...

2017-02-07 Thread Andreas Sandberg
changeset f254d8a17da9 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=f254d8a17da9
description:
style: Force Python.h to be included before main header

Python's header files set various compiler macros (e.g.,
_XOPEN_SOURCE) unconditionally. This triggers preprocessor warnings
that end up being treated as errors. The Python integration manual [1]
strongly recommends that Python.h is included before any system
header. The style guide used to mandate that Python.h is included
first in any file that needs it. This requirement was changed to
always include a source file's main header first, which ended up
triggering these errors.

This change updates the style checker to always include Python.h
before the main header file.

[1] https://docs.python.org/2/extending/extending.html

Change-Id: Id6a4f7fc64a336a8fd26691a0ca682abeb1d1579
Signed-off-by: Andreas Sandberg 
Reviewed-by: Nikos Nikoleris 
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Pierre-Yves Péneau 

diffstat:

 src/python/swig/pyevent.cc  |  4 ++--
 src/sim/init.cc |  4 ++--
 src/sim/py_interact.cc  |  4 ++--
 util/style/sort_includes.py |  2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diffs (61 lines):

diff -r 63325e5b0a9d -r f254d8a17da9 src/python/swig/pyevent.cc
--- a/src/python/swig/pyevent.ccFri Jan 27 15:07:20 2017 -0600
+++ b/src/python/swig/pyevent.ccTue Feb 07 15:28:33 2017 +
@@ -28,10 +28,10 @@
  * Authors: Nathan Binkert
  */
 
+#include 
+
 #include "python/swig/pyevent.hh"
 
-#include 
-
 #include "base/misc.hh"
 #include "sim/async.hh"
 #include "sim/eventq.hh"
diff -r 63325e5b0a9d -r f254d8a17da9 src/sim/init.cc
--- a/src/sim/init.cc   Fri Jan 27 15:07:20 2017 -0600
+++ b/src/sim/init.cc   Tue Feb 07 15:28:33 2017 +
@@ -41,10 +41,10 @@
  * Authors: Nathan Binkert
  */
 
+#include 
+
 #include "sim/init.hh"
 
-#include 
-
 #include 
 #include 
 
diff -r 63325e5b0a9d -r f254d8a17da9 src/sim/py_interact.cc
--- a/src/sim/py_interact.ccFri Jan 27 15:07:20 2017 -0600
+++ b/src/sim/py_interact.ccTue Feb 07 15:28:33 2017 +
@@ -29,10 +29,10 @@
  *  Steve Reinhardt
  */
 
+#include 
+
 #include "sim/py_interact.hh"
 
-#include 
-
 void
 py_interact()
 {
diff -r 63325e5b0a9d -r f254d8a17da9 util/style/sort_includes.py
--- a/util/style/sort_includes.py   Fri Jan 27 15:07:20 2017 -0600
+++ b/util/style/sort_includes.py   Tue Feb 07 15:28:33 2017 +
@@ -169,8 +169,8 @@
 )
 
 block_order = (
+('python', ),
 ('main', ),
-('python', ),
 ('c', ),
 ('stl', ),
 ('cc', ),
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request 3808: mem: fix printing of 1st cache tags line

2017-02-07 Thread Jason Lowe-Power

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

Ship it!


Ship It!

- Jason Lowe-Power


On Feb. 7, 2017, 2:25 p.m., Bjoern A. Zeeb wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3808/
> ---
> 
> (Updated Feb. 7, 2017, 2:25 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Rather than having the 1st line on the Log line and every other line on its 
> own, add a new line to have a common format for all of them.  Makes parsing a 
> lot easier.
> 
> Before:
> 1813979170500: system.l2cache: recvTimingReq tags:set: 0 block: 0 
> state: f (M) valid: 1 writable: 1 readable: 1 dirty: 1 tag: fff3
> set: 0 block: 1 state: 7 (E) valid: 1 writable: 1 readable: 1 dirty: 
> 0 tag: f9a3
> 
> After:
> 1813979170500: system.l2cache: recvTimingReq tags:
> set: 0 block: 0 state: f (M) valid: 1 writable: 1 readable: 1 dirty: 
> 1 tag: fff3
> set: 0 block: 1 state: 7 (E) valid: 1 writable: 1 readable: 1 dirty: 
> 0 tag: f9a3
> 
> 
> Diffs
> -
> 
>   src/mem/cache/cache.cc 63325e5b0a9d 
> 
> Diff: http://reviews.gem5.org/r/3808/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Bjoern A. Zeeb
> 
>

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


Re: [gem5-dev] Review Request 3794: style: Force Python.h to be included before main header

2017-02-07 Thread Jason Lowe-Power

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

Ship it!


Update the commit message with a link to the python manual?

- Jason Lowe-Power


On Jan. 27, 2017, 1:39 p.m., Andreas Sandberg wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3794/
> ---
> 
> (Updated Jan. 27, 2017, 1:39 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Changeset 11803:1dba09aeeefd
> ---
> style: Force Python.h to be included before main header
> 
> Python's header files set various compiler macros (e.g.,
> _XOPEN_SOURCE) unconditionally. This triggers preprocessor warnings
> that end up being treated as errors. The style guide used to mandate
> that Python headers are included before any other header. This
> requirement was changed to always include a source file's main header
> first, which ended up triggering these errors.
> 
> This change updates the style checker to always include Python.h
> before the main header file.
> 
> Change-Id: Id6a4f7fc64a336a8fd26691a0ca682abeb1d1579
> Signed-off-by: Andreas Sandberg 
> Reviewed-by: Nikos Nikoleris 
> 
> 
> Diffs
> -
> 
>   src/python/swig/pyevent.cc be62996c95d1 
>   src/sim/init.cc be62996c95d1 
>   src/sim/py_interact.cc be62996c95d1 
>   util/style/sort_includes.py be62996c95d1 
> 
> Diff: http://reviews.gem5.org/r/3794/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Andreas Sandberg
> 
>

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


Re: [gem5-dev] Review Request 3794: style: Force Python.h to be included before main header

2017-02-07 Thread Andreas Sandberg


> On Jan. 27, 2017, 3 p.m., Jason Lowe-Power wrote:
> > Oops. I should have included this in my description of 
> > http://reviews.gem5.org/r/3792/. I think another solution is to include 
> > Python.h in src/python/swig/pyevent.hh. See my change in 
> > http://reviews.gem5.org/r/3792/diff/1/#33.
> > 
> > If my fix does work, I think it's better to just include Python.h there 
> > instead of changing the style.
> 
> Andreas Sandberg wrote:
> I'd like to avoid including Python.h in any header files for dependency 
> reasons. Another reason for including it before any other header is that it 
> solves this entire class of issues (the flip side is that we wouldn't always 
> spot headers that requires it).
> 
> We actually used to require the Python header to be first in the files 
> that required it, but it got lost in a a style update a while back.
> 
> Jason Lowe-Power wrote:
> Could you explain more about why you don't want to include Python.h in 
> pyevent.hh? It seems to me that since this file requires things declared in 
> Python.h (e.g., PyObject) that it should be included here. Otherwise, we have 
> to remember that anytime we include python/swig/pyevent.hh we first must 
> include Python.h.
> 
> Andreas Sandberg wrote:
> Sorry, you're absolutely right. It should definitely be included in 
> pyevent.hh. Does that solve the rest of the Python issues? If so, do we 
> need/want this change?
> 
> Jason Lowe-Power wrote:
> I *think* it solves all of the issues. I was able to use 
> http://reviews.gem5.org/r/3792/ and http://reviews.gem5.org/r/3779/ to 
> resolve all of the build issues on Arch Linux.
> 
> I'm not opposed to pushing this to change the style back, if we think 
> that makes sense, too. But I think it's somewhat orthogonal to the build 
> errors.

I had a look at the Python manual, this is what it states:

Note Since Python may define some pre-processor definitions which affect 
the standard headers on some systems, you must include Python.h before any 
standard headers are included.

Seems like we should include Python.h first after all.


- Andreas


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


On Jan. 27, 2017, 1:39 p.m., Andreas Sandberg wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3794/
> ---
> 
> (Updated Jan. 27, 2017, 1:39 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Changeset 11803:1dba09aeeefd
> ---
> style: Force Python.h to be included before main header
> 
> Python's header files set various compiler macros (e.g.,
> _XOPEN_SOURCE) unconditionally. This triggers preprocessor warnings
> that end up being treated as errors. The style guide used to mandate
> that Python headers are included before any other header. This
> requirement was changed to always include a source file's main header
> first, which ended up triggering these errors.
> 
> This change updates the style checker to always include Python.h
> before the main header file.
> 
> Change-Id: Id6a4f7fc64a336a8fd26691a0ca682abeb1d1579
> Signed-off-by: Andreas Sandberg 
> Reviewed-by: Nikos Nikoleris 
> 
> 
> Diffs
> -
> 
>   src/python/swig/pyevent.cc be62996c95d1 
>   src/sim/init.cc be62996c95d1 
>   src/sim/py_interact.cc be62996c95d1 
>   util/style/sort_includes.py be62996c95d1 
> 
> Diff: http://reviews.gem5.org/r/3794/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Andreas Sandberg
> 
>

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


Re: [gem5-dev] Review Request 3808: mem: fix printing of 1st cache tags line

2017-02-07 Thread Pierre-Yves Péneau

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

Ship it!


Ship It!

- Pierre-Yves Péneau


On Feb. 7, 2017, 3:25 p.m., Bjoern A. Zeeb wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/3808/
> ---
> 
> (Updated Feb. 7, 2017, 3:25 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> ---
> 
> Rather than having the 1st line on the Log line and every other line on its 
> own, add a new line to have a common format for all of them.  Makes parsing a 
> lot easier.
> 
> Before:
> 1813979170500: system.l2cache: recvTimingReq tags:set: 0 block: 0 
> state: f (M) valid: 1 writable: 1 readable: 1 dirty: 1 tag: fff3
> set: 0 block: 1 state: 7 (E) valid: 1 writable: 1 readable: 1 dirty: 
> 0 tag: f9a3
> 
> After:
> 1813979170500: system.l2cache: recvTimingReq tags:
> set: 0 block: 0 state: f (M) valid: 1 writable: 1 readable: 1 dirty: 
> 1 tag: fff3
> set: 0 block: 1 state: 7 (E) valid: 1 writable: 1 readable: 1 dirty: 
> 0 tag: f9a3
> 
> 
> Diffs
> -
> 
>   src/mem/cache/cache.cc 63325e5b0a9d 
> 
> Diff: http://reviews.gem5.org/r/3808/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Bjoern A. Zeeb
> 
>

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


[gem5-dev] Review Request 3808: mem: fix printing of 1st cache tags line

2017-02-07 Thread Bjoern A. Zeeb

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

Review request for Default.


Repository: gem5


Description
---

Rather than having the 1st line on the Log line and every other line on its 
own, add a new line to have a common format for all of them.  Makes parsing a 
lot easier.

Before:
1813979170500: system.l2cache: recvTimingReq tags:set: 0 block: 0 
state: f (M) valid: 1 writable: 1 readable: 1 dirty: 1 tag: fff3
set: 0 block: 1 state: 7 (E) valid: 1 writable: 1 readable: 1 dirty: 0 
tag: f9a3

After:
1813979170500: system.l2cache: recvTimingReq tags:
set: 0 block: 0 state: f (M) valid: 1 writable: 1 readable: 1 dirty: 1 
tag: fff3
set: 0 block: 1 state: 7 (E) valid: 1 writable: 1 readable: 1 dirty: 0 
tag: f9a3


Diffs
-

  src/mem/cache/cache.cc 63325e5b0a9d 

Diff: http://reviews.gem5.org/r/3808/diff/


Testing
---


Thanks,

Bjoern A. Zeeb

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