Re: [gem5-dev] Making the verification bit sicky(ier) in gerrit

2020-03-31 Thread Bobby Bruce
Sounds like a great idea to me. I fail to see any downside.
--
Dr. Bobby R. Bruce
Room 2235,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net


On Tue, Mar 31, 2020 at 7:03 PM Gabe Black  wrote:

> Hi folks. I (and probably many of you) have noticed that gerrit sometimes
> decides something needs to be rebased when it doesn't really seem to, and
> that rebase ends up forcing a rerun of verification which delays getting a
> patch checked in, and incurs extra cost for gem5 for the compute resources
> which run the verification.
>
> I asked for potential solutions from the gerrit team within google, and
> they suggested turning on this property of the verified label:
>
>
> https://gerrit-review.googlesource.com/Documentation/config-labels.html#label_copyAllScoresOnTrivialRebase
>
> They said that since we already have the "Rebase Always" merge strategy
> selected it wouldn't reduce the level of verification for changes, and
> while it wouldn't avoid having to do trivial rebases (there's a button in
> gerrit for that), it would avoid having to rerun verification.
>
> Note that this would not make the verification label permanent, it would
> just mean that as long as the rebase was trivial (no commit message change,
> no diff change including context lines) then it would stay verified.
>
> Does that sound like a good idea to everyone? If so, I can look into how to
> make that happen.
>
> Gabe
> ___
> 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

[gem5-dev] Making the verification bit sicky(ier) in gerrit

2020-03-31 Thread Gabe Black
Hi folks. I (and probably many of you) have noticed that gerrit sometimes
decides something needs to be rebased when it doesn't really seem to, and
that rebase ends up forcing a rerun of verification which delays getting a
patch checked in, and incurs extra cost for gem5 for the compute resources
which run the verification.

I asked for potential solutions from the gerrit team within google, and
they suggested turning on this property of the verified label:

https://gerrit-review.googlesource.com/Documentation/config-labels.html#label_copyAllScoresOnTrivialRebase

They said that since we already have the "Rebase Always" merge strategy
selected it wouldn't reduce the level of verification for changes, and
while it wouldn't avoid having to do trivial rebases (there's a button in
gerrit for that), it would avoid having to rerun verification.

Note that this would not make the verification label permanent, it would
just mean that as long as the rebase was trivial (no commit message change,
no diff change including context lines) then it would stay verified.

Does that sound like a good idea to everyone? If so, I can look into how to
make that happen.

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

Re: [gem5-dev] m5 utility patch series

2020-03-31 Thread Gabe Black
Hi Jason, replies inline.

On Tue, Mar 31, 2020 at 3:29 PM Jason Lowe-Power 
wrote:

> Oh, one more comment...
>
> Do you think it's worth changing the name to "gem5" instead of "m5". Since
> we're making big changes, it seems like now might be right time.
>

That's not a bad idea, although there are a lot of compatibility issues
that make me want to keep that separate. For instance, if we change all the
names for the symbols for calling the ops from m5_* to gem5_*, that would
break existing consumers of the library. It would be easy to fix them with
simple find/replace assuming they can be rebuilt and is probably worth
doing, but it would be a good idea to draw people's attention to it before
hand.

In general I think it would be a good idea to pick a good name for these
operations (m5 ops, gem5 ops, pseudo ops, pseudo instructions) and stick
with it throughout the code base. I personally like gem5 ops since we're
not m5 any more, they aren't always instructions, and if they aren't there
not really pseudo anything, but again it would be nice to let people have
some input before scrubbing that down.


>
> Cheers,
> Jason
>
> On Tue, Mar 31, 2020 at 3:10 PM Jason Lowe-Power 
> wrote:
>
> > Hey Gabe,
> >
> > First of all, thanks for this cleanup. We've needed to update this code
> > for a long time!
> >
> > Do you have a pointer to what would be "new" documentation on the m5 ops
> > tools? I was briefly going through your changes and it's not clear how
> > you're envisioning people using this library now. For instance, I'd like
> to
> > understand:
> > - How do I build the m5 binary for full system mode?
>

scons build/${version you want}

For aarch64 for instance, this will build, among other things,
build/aarch64/out/m5 which is the m5 binary for 64 bit ARM. It will support
the instruction based method (default, or with --inst), address based
method (with --addr, or --addr=${address}, or --addr ${address}), and
semihosting based method (with --semi).


> > - How do I link my application to the m5 "library" in SE mode?
>

This is the same as before, just link against build/${version}/out/libm5.a,
and include the same header in include/m5ops.h. Note that the version of
the functions in the header have no suffix, and so will use the instruction
based call method. There aren't prototypes for them (I should fix that in a
later change), but there are also versions with suffixes which use the
other methods, *_addr and *_semi.


> > - How do I link my application to the m5 "library" in FS mode?
>

Same as above.


> >
> > Before, this wasn't documented very well, but it was kinda obvious that
> > you just "had to do it yourself". With your changes, it looks like you
> have
> > some very specific use cases in mind. It would be good to understand your
> > vision while I'm reviewing these changes. I looked through the document
> you
> > linked in your other email, but didn't really see how this fit in.
>

Much of this is generic cleanup to get to a good spot to implement what's
in that doc, rather than building on top of an unstable base. The doc is
describing how the utility will now support multiple call methods in the
same utility, and how it will support calling through semihosting on ARM.
It would be a good idea to make some sort of README to put in the m5
utility directory and/or on the website, and I have plans (which I need to
write up) about how to build tests for the m5 utility so it doesn't get
broken as easily in the future.


> >
> > Thanks!
> > Jason
> >
> > On Fri, Mar 27, 2020 at 6:31 PM Gabe Black  wrote:
> >
> >> Hi folks. I just uploaded a series (mostly small) patches which revamp
> the
> >> m5 utility as described in a design document I sent out a while ago.
> I've
> >> done some very preliminary sanity testing, but a lot more testing
> >> can/should be done to make sure I didn't screw anything up.
> >>
> >> One thing in particular that still needs to be done is to expand the
> java
> >> and lua wrappers so that they can call the different backends for the m5
> >> ops (instruction, address, and semihosting). That can be done in the
> >> future
> >> since I *suspect* those wrappers aren't used very much. If we provide
> them
> >> though, we should try to make sure they work.
> >>
> >> https://gem5-review.googlesource.com/c/public/gem5/+/27246/1
> >>
> >> Gabe
> >> ___
> >> 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
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[develop]: util: Remove the subfunc arg from M5OP_FOREACH.

2020-03-31 Thread Gabe Black (Gerrit)
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27205 )


Change subject: util: Remove the subfunc arg from M5OP_FOREACH.
..

util: Remove the subfunc arg from M5OP_FOREACH.

Now that the annotation pseudo ops are removed, the subfunction is
always zero. It is no longer decoded within gem5 either. The format of
the pseudo op func/subfunc mechanism is unchanged for compatibility, but
the subfunc field will always be zero now.

Change-Id: I2167571577b6557d06aa26d8aecaca78797f5f59
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27205
Tested-by: kokoro 
Reviewed-by: Daniel Carvalho 
Maintainer: Bobby R. Bruce 
---
M include/gem5/asm/generic/m5ops.h
M util/m5/m5op_arm.S
M util/m5/m5op_arm_A64.S
3 files changed, 33 insertions(+), 33 deletions(-)

Approvals:
  Daniel Carvalho: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/include/gem5/asm/generic/m5ops.h  
b/include/gem5/asm/generic/m5ops.h

index 8b1f04a..e887b72 100644
--- a/include/gem5/asm/generic/m5ops.h
+++ b/include/gem5/asm/generic/m5ops.h
@@ -101,29 +101,29 @@


 #define M5OP_FOREACH\
-M5OP(m5_arm, M5OP_ARM, 0);  \
-M5OP(m5_quiesce, M5OP_QUIESCE, 0);  \
-M5OP(m5_quiesce_ns, M5OP_QUIESCE_NS, 0);\
-M5OP(m5_quiesce_cycle, M5OP_QUIESCE_CYCLE, 0);  \
-M5OP(m5_quiesce_time, M5OP_QUIESCE_TIME, 0);\
-M5OP(m5_rpns, M5OP_RPNS, 0);\
-M5OP(m5_wake_cpu, M5OP_WAKE_CPU, 0);\
-M5OP(m5_exit, M5OP_EXIT, 0);\
-M5OP(m5_fail, M5OP_FAIL, 0);\
-M5OP(m5_init_param, M5OP_INIT_PARAM, 0);\
-M5OP(m5_load_symbol, M5OP_LOAD_SYMBOL, 0);  \
-M5OP(m5_reset_stats, M5OP_RESET_STATS, 0);  \
-M5OP(m5_dump_stats, M5OP_DUMP_STATS, 0);\
-M5OP(m5_dump_reset_stats, M5OP_DUMP_RESET_STATS, 0);\
-M5OP(m5_checkpoint, M5OP_CHECKPOINT, 0);\
-M5OP(m5_read_file, M5OP_READ_FILE, 0);  \
-M5OP(m5_write_file, M5OP_WRITE_FILE, 0);\
-M5OP(m5_debug_break, M5OP_DEBUG_BREAK, 0);  \
-M5OP(m5_switch_cpu, M5OP_SWITCH_CPU, 0);\
-M5OP(m5_add_symbol, M5OP_ADD_SYMBOL, 0);\
-M5OP(m5_panic, M5OP_PANIC, 0);  \
-M5OP(m5_work_begin, M5OP_WORK_BEGIN, 0);\
-M5OP(m5_work_end, M5OP_WORK_END, 0);\
-M5OP(m5_dist_toggle_sync, M5OP_DIST_TOGGLE_SYNC, 0);
+M5OP(m5_arm, M5OP_ARM); \
+M5OP(m5_quiesce, M5OP_QUIESCE); \
+M5OP(m5_quiesce_ns, M5OP_QUIESCE_NS);   \
+M5OP(m5_quiesce_cycle, M5OP_QUIESCE_CYCLE); \
+M5OP(m5_quiesce_time, M5OP_QUIESCE_TIME);   \
+M5OP(m5_rpns, M5OP_RPNS);   \
+M5OP(m5_wake_cpu, M5OP_WAKE_CPU);   \
+M5OP(m5_exit, M5OP_EXIT);   \
+M5OP(m5_fail, M5OP_FAIL);   \
+M5OP(m5_init_param, M5OP_INIT_PARAM);   \
+M5OP(m5_load_symbol, M5OP_LOAD_SYMBOL); \
+M5OP(m5_reset_stats, M5OP_RESET_STATS); \
+M5OP(m5_dump_stats, M5OP_DUMP_STATS);   \
+M5OP(m5_dump_reset_stats, M5OP_DUMP_RESET_STATS);   \
+M5OP(m5_checkpoint, M5OP_CHECKPOINT);   \
+M5OP(m5_read_file, M5OP_READ_FILE); \
+M5OP(m5_write_file, M5OP_WRITE_FILE);   \
+M5OP(m5_debug_break, M5OP_DEBUG_BREAK); \
+M5OP(m5_switch_cpu, M5OP_SWITCH_CPU);   \
+M5OP(m5_add_symbol, M5OP_ADD_SYMBOL);   \
+M5OP(m5_panic, M5OP_PANIC); \
+M5OP(m5_work_begin, M5OP_WORK_BEGIN);   \
+M5OP(m5_work_end, M5OP_WORK_END);   \
+M5OP(m5_dist_toggle_sync, M5OP_DIST_TOGGLE_SYNC);

 #endif //  __GEM5_ASM_GENERIC_M5OPS_H__
diff --git a/util/m5/m5op_arm.S b/util/m5/m5op_arm.S
index c0487c0..b4f7fb3 100644
--- a/util/m5/m5op_arm.S
+++ b/util/m5/m5op_arm.S
@@ -46,19 +46,19 @@

 .text

-.macro m5op_func name, func, subfunc
+.macro m5op_func name, func
 .align 2
 .globl \name
 \name:
 #ifdef __thumb__
 .short 0xEE00 | \func
-.short 0x0110 | (\subfunc << 12)
+.short 0x0110
 #else
-.long 0xEE000110 | (\func << 16) | (\subfunc << 12)
+   

[gem5-dev] Change in gem5/gem5[develop]: misc: Remove the now unused M5OP_FOREACH_ANNOTATION macro.

2020-03-31 Thread Gabe Black (Gerrit)
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27204 )


Change subject: misc: Remove the now unused M5OP_FOREACH_ANNOTATION macro.
..

misc: Remove the now unused M5OP_FOREACH_ANNOTATION macro.

Change-Id: I33827c923cf02c94fea2df972919636961f3dd94
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27204
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Daniel Carvalho 
Maintainer: Bobby R. Bruce 
---
M include/gem5/asm/generic/m5ops.h
1 file changed, 0 insertions(+), 18 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Daniel Carvalho: Looks good to me, but someone else must approve
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/include/gem5/asm/generic/m5ops.h  
b/include/gem5/asm/generic/m5ops.h

index d0ee337..8b1f04a 100644
--- a/include/gem5/asm/generic/m5ops.h
+++ b/include/gem5/asm/generic/m5ops.h
@@ -126,22 +126,4 @@
 M5OP(m5_work_end, M5OP_WORK_END, 0);\
 M5OP(m5_dist_toggle_sync, M5OP_DIST_TOGGLE_SYNC, 0);

-#define M5OP_FOREACH_ANNOTATION  \
-M5_ANNOTATION(m5a_bsm, M5OP_AN_BSM); \
-M5_ANNOTATION(m5a_esm, M5OP_AN_ESM); \
-M5_ANNOTATION(m5a_begin, M5OP_AN_BEGIN); \
-M5_ANNOTATION(m5a_end, M5OP_AN_END); \
-M5_ANNOTATION(m5a_q, M5OP_AN_Q); \
-M5_ANNOTATION(m5a_dq, M5OP_AN_DQ);   \
-M5_ANNOTATION(m5a_wf, M5OP_AN_WF);   \
-M5_ANNOTATION(m5a_we, M5OP_AN_WE);   \
-M5_ANNOTATION(m5a_rq, M5OP_AN_RQ);   \
-M5_ANNOTATION(m5a_ws, M5OP_AN_WS);   \
-M5_ANNOTATION(m5a_sq, M5OP_AN_SQ);   \
-M5_ANNOTATION(m5a_aq, M5OP_AN_AQ);   \
-M5_ANNOTATION(m5a_pq, M5OP_AN_PQ);   \
-M5_ANNOTATION(m5a_l, M5OP_AN_L); \
-M5_ANNOTATION(m5a_identify, M5OP_AN_IDENTIFY);   \
-M5_ANNOTATION(m5a_getid, M5OP_AN_GETID);
-
 #endif //  __GEM5_ASM_GENERIC_M5OPS_H__

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27204
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I33827c923cf02c94fea2df972919636961f3dd94
Gerrit-Change-Number: 27204
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Earl Ou 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Yu-hsin Wang 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Re: [gem5-dev] m5 utility patch series

2020-03-31 Thread Jason Lowe-Power
Oh, one more comment...

Do you think it's worth changing the name to "gem5" instead of "m5". Since
we're making big changes, it seems like now might be right time.

Cheers,
Jason

On Tue, Mar 31, 2020 at 3:10 PM Jason Lowe-Power 
wrote:

> Hey Gabe,
>
> First of all, thanks for this cleanup. We've needed to update this code
> for a long time!
>
> Do you have a pointer to what would be "new" documentation on the m5 ops
> tools? I was briefly going through your changes and it's not clear how
> you're envisioning people using this library now. For instance, I'd like to
> understand:
> - How do I build the m5 binary for full system mode?
> - How do I link my application to the m5 "library" in SE mode?
> - How do I link my application to the m5 "library" in FS mode?
>
> Before, this wasn't documented very well, but it was kinda obvious that
> you just "had to do it yourself". With your changes, it looks like you have
> some very specific use cases in mind. It would be good to understand your
> vision while I'm reviewing these changes. I looked through the document you
> linked in your other email, but didn't really see how this fit in.
>
> Thanks!
> Jason
>
> On Fri, Mar 27, 2020 at 6:31 PM Gabe Black  wrote:
>
>> Hi folks. I just uploaded a series (mostly small) patches which revamp the
>> m5 utility as described in a design document I sent out a while ago. I've
>> done some very preliminary sanity testing, but a lot more testing
>> can/should be done to make sure I didn't screw anything up.
>>
>> One thing in particular that still needs to be done is to expand the java
>> and lua wrappers so that they can call the different backends for the m5
>> ops (instruction, address, and semihosting). That can be done in the
>> future
>> since I *suspect* those wrappers aren't used very much. If we provide them
>> though, we should try to make sure they work.
>>
>> https://gem5-review.googlesource.com/c/public/gem5/+/27246/1
>>
>> Gabe
>> ___
>> 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

Re: [gem5-dev] m5 utility patch series

2020-03-31 Thread Jason Lowe-Power
Hey Gabe,

First of all, thanks for this cleanup. We've needed to update this code for
a long time!

Do you have a pointer to what would be "new" documentation on the m5 ops
tools? I was briefly going through your changes and it's not clear how
you're envisioning people using this library now. For instance, I'd like to
understand:
- How do I build the m5 binary for full system mode?
- How do I link my application to the m5 "library" in SE mode?
- How do I link my application to the m5 "library" in FS mode?

Before, this wasn't documented very well, but it was kinda obvious that you
just "had to do it yourself". With your changes, it looks like you have
some very specific use cases in mind. It would be good to understand your
vision while I'm reviewing these changes. I looked through the document you
linked in your other email, but didn't really see how this fit in.

Thanks!
Jason

On Fri, Mar 27, 2020 at 6:31 PM Gabe Black  wrote:

> Hi folks. I just uploaded a series (mostly small) patches which revamp the
> m5 utility as described in a design document I sent out a while ago. I've
> done some very preliminary sanity testing, but a lot more testing
> can/should be done to make sure I didn't screw anything up.
>
> One thing in particular that still needs to be done is to expand the java
> and lua wrappers so that they can call the different backends for the m5
> ops (instruction, address, and semihosting). That can be done in the future
> since I *suspect* those wrappers aren't used very much. If we provide them
> though, we should try to make sure they work.
>
> https://gem5-review.googlesource.com/c/public/gem5/+/27246/1
>
> Gabe
> ___
> 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

Re: [gem5-dev] Removing kokoro runs

2020-03-31 Thread Bobby Bruce
Yes,

We're using this migration to slowly drop support for GCC 4 (
https://gem5.atlassian.net/browse/GEM5-218), which i believe is causing
these discrepencies. GCB runs on a Docker Image built with
https://gem5.googlesource.com/public/gem5/+/refs/heads/develop/util/dockerfiles/ubuntu-18.04_all-dependencies/Dockerfile.


I'm currently working on a script that I hope fixes all of Jason's points
so we can fully migrate prior to gem5-20 ( I'm going to try to keep the
name Kokoro because both Jason and I think "Gem5 Cloud Project GCB service
account" is annoyingly long).

--
Dr. Bobby R. Bruce
Room 2235,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net


On Tue, Mar 31, 2020 at 9:27 AM Giacomo Travaglini <
giacomo.travagl...@arm.com> wrote:

> Thanks Jason for the great effort you are putting on this, and for
> updating us on the current state.
>
>
>
> It’s not really relevant to our discussion, but while GCB and kokoro run
> the same tests, they do that under different building environments.
>
> An example is:
>
>
>
> https://gem5-review.googlesource.com/c/public/gem5/+/23527
>
>
>
> Which is failing under kokoro (gcc4.8) while passing under GCB
>
>
>
> Giacomo
>
>
>
>
>
> *From:* Jason Lowe-Power 
> *Sent:* 31 March 2020 16:17
> *To:* Ciro Santilli 
> *Cc:* Giacomo Travaglini ; Nils Asmussen <
> n...@os.inf.tu-dresden.de>; gem5 Developer List ;
> Bobby Bruce 
> *Subject:* Re: [gem5-dev] Removing kokoro runs
>
>
>
> A couple of things... Bobby can correct me if I'm wrong.
>
>
>
> 1. GCB and kokoro should be running *the same tests*. So they should
> always have the same result. There's no need to wait for kokoro if you have
> a +1 from GCB.
>
> 2. The migration is still in progress. There are a couple of loose ends we
> need to tie up before turning off kokoro.
>
>   - Getting the logs to be publicly available (see below)
>
>   - Requiring a maintainer +1 before running GCB (this is needed to cut
> down on our costs... right now, we're spending between $10 and $60 per day
> depending on the number of changesets.
>
>   - Running in batches instead of every time something is pushed. Right
> now, if you push two versions of the same changeset back to back we test
> both of them... we need to stop doing that. This isn't an "automatic"
> feature of GCB, so we're working on our own implementation of batching.
>
> 3. The permissions are something we're working on. GCB does not allow us
> to make the logs public. Seems like an obvious important feature, but we
> can't find a way. We're working on a system that will automatically dump
> those logs into a publicly available bucket. We'll make sure this done
> before we turn off kokoro.
>
>
>
> At a higher level... it's turned out to be a lot more engineering work to
> get GCB + gerrit working for our use case of CI testing. If anyone else has
> expertise here and would like to contribute to help us get this to
> production quality, we would appreciate it!
>
>
>
> Cheers,
>
> Jason
>
>
>
> On Tue, Mar 31, 2020 at 7:38 AM Ciro Santilli 
> wrote:
>
> Yes, I am logged in.
> --
>
> *From:* Giacomo Travaglini 
> *Sent:* Tuesday, March 31, 2020 3:29 PM
> *To:* Nils Asmussen ; gem5 Developer List <
> gem5-dev@gem5.org>; Ciro Santilli ; Jason
> Lowe-Power ; Bobby Bruce 
> *Subject:* RE: [gem5-dev] Removing kokoro runs
>
>
>
> Have you tried to login?
>
> Giacomo
>
> -Original Message-
> From: Nils Asmussen 
> Sent: 31 March 2020 15:27
> To: gem5 Developer List ; Ciro Santilli <
> ciro.santi...@arm.com>; Jason Lowe-Power ; Bobby
> Bruce ; Giacomo Travaglini  >
> Subject: Re: [gem5-dev] Removing kokoro runs
>
> Hi,
>
> same for me. Google says the permission "cloudbuild.builds.get" is missing.
>
> Best regards,
> Nils
>
>
> On 3/31/20 4:23 PM, Ciro Santilli wrote:
> > Since Giacomo started this thread, I would also want to chime in a
> related question: are you able to see GCB run logs?
> >
> > E.g. at: https://gem5-review.googlesource.com/c/public/gem5/+/27315 GCB
> links to
> https://console.cloud.google.com/cloud-build/builds/bbd716e1-a572-4c69-8c99-612df1755898?project=345032938727=1
> but when I visit that I get: "You do not have sufficient permissions to
> view this page".
> >
> > Do others reproduce/is it expected?
> > 
> > From: gem5-dev  on behalf of Giacomo
> Travaglini 
> > Sent: Tuesday, March 31, 2020 1:21 PM
> > To: gem5-dev@gem5.org ; Jason Lowe-Power <
> ja...@lowepower.com>; Bobby Bruce 
> > Subject: [gem5-dev] Removing kokoro runs
> >
> > Hi,
> >
> > I have noticed we have started using the Google Cloud service to run our
> pre-submit regressions.
> > At the moment this is happening in parallel with kokoro.
> >
> > Few things to point out:
> >
> >
> >   1.  It is actually possible now to submit a patch without kokoro. GCB
> is faster than kokoro and starts as soon as the patch is pushed regardless
> of the maintainer vote. As soon as you get +2, +1, +1 (from GCB) you can

Re: [gem5-dev] Removing kokoro runs

2020-03-31 Thread Giacomo Travaglini
Thanks Jason for the great effort you are putting on this, and for updating us 
on the current state.

It’s not really relevant to our discussion, but while GCB and kokoro run the 
same tests, they do that under different building environments.
An example is:

https://gem5-review.googlesource.com/c/public/gem5/+/23527

Which is failing under kokoro (gcc4.8) while passing under GCB

Giacomo


From: Jason Lowe-Power 
Sent: 31 March 2020 16:17
To: Ciro Santilli 
Cc: Giacomo Travaglini ; Nils Asmussen 
; gem5 Developer List ; Bobby 
Bruce 
Subject: Re: [gem5-dev] Removing kokoro runs

A couple of things... Bobby can correct me if I'm wrong.

1. GCB and kokoro should be running *the same tests*. So they should always 
have the same result. There's no need to wait for kokoro if you have a +1 from 
GCB.
2. The migration is still in progress. There are a couple of loose ends we need 
to tie up before turning off kokoro.
  - Getting the logs to be publicly available (see below)
  - Requiring a maintainer +1 before running GCB (this is needed to cut down on 
our costs... right now, we're spending between $10 and $60 per day depending on 
the number of changesets.
  - Running in batches instead of every time something is pushed. Right now, if 
you push two versions of the same changeset back to back we test both of 
them... we need to stop doing that. This isn't an "automatic" feature of GCB, 
so we're working on our own implementation of batching.
3. The permissions are something we're working on. GCB does not allow us to 
make the logs public. Seems like an obvious important feature, but we can't 
find a way. We're working on a system that will automatically dump those logs 
into a publicly available bucket. We'll make sure this done before we turn off 
kokoro.

At a higher level... it's turned out to be a lot more engineering work to get 
GCB + gerrit working for our use case of CI testing. If anyone else has 
expertise here and would like to contribute to help us get this to production 
quality, we would appreciate it!

Cheers,
Jason

On Tue, Mar 31, 2020 at 7:38 AM Ciro Santilli 
mailto:ciro.santi...@arm.com>> wrote:
Yes, I am logged in.

From: Giacomo Travaglini 
mailto:giacomo.travagl...@arm.com>>
Sent: Tuesday, March 31, 2020 3:29 PM
To: Nils Asmussen 
mailto:n...@os.inf.tu-dresden.de>>; gem5 Developer 
List mailto:gem5-dev@gem5.org>>; Ciro Santilli 
mailto:ciro.santi...@arm.com>>; Jason Lowe-Power 
mailto:ja...@lowepower.com>>; Bobby Bruce 
mailto:bbr...@ucdavis.edu>>
Subject: RE: [gem5-dev] Removing kokoro runs

Have you tried to login?

Giacomo

-Original Message-
From: Nils Asmussen 
mailto:n...@os.inf.tu-dresden.de>>
Sent: 31 March 2020 15:27
To: gem5 Developer List mailto:gem5-dev@gem5.org>>; Ciro 
Santilli mailto:ciro.santi...@arm.com>>; Jason 
Lowe-Power mailto:ja...@lowepower.com>>; Bobby Bruce 
mailto:bbr...@ucdavis.edu>>; Giacomo Travaglini 
mailto:giacomo.travagl...@arm.com>>
Subject: Re: [gem5-dev] Removing kokoro runs

Hi,

same for me. Google says the permission "cloudbuild.builds.get" is missing.

Best regards,
Nils


On 3/31/20 4:23 PM, Ciro Santilli wrote:
> Since Giacomo started this thread, I would also want to chime in a related 
> question: are you able to see GCB run logs?
>
> E.g. at: https://gem5-review.googlesource.com/c/public/gem5/+/27315 GCB links 
> to 
> https://console.cloud.google.com/cloud-build/builds/bbd716e1-a572-4c69-8c99-612df1755898?project=345032938727=1
>   but when I visit that I get: "You do not have sufficient permissions to 
> view this page".
>
> Do others reproduce/is it expected?
> 
> From: gem5-dev mailto:gem5-dev-boun...@gem5.org>> 
> on behalf of Giacomo Travaglini 
> mailto:giacomo.travagl...@arm.com>>
> Sent: Tuesday, March 31, 2020 1:21 PM
> To: gem5-dev@gem5.org 
> mailto:gem5-dev@gem5.org>>; Jason Lowe-Power 
> mailto:ja...@lowepower.com>>; Bobby Bruce 
> mailto:bbr...@ucdavis.edu>>
> Subject: [gem5-dev] Removing kokoro runs
>
> Hi,
>
> I have noticed we have started using the Google Cloud service to run our 
> pre-submit regressions.
> At the moment this is happening in parallel with kokoro.
>
> Few things to point out:
>
>
>   1.  It is actually possible now to submit a patch without kokoro. GCB is 
> faster than kokoro and starts as soon as the patch is pushed regardless of 
> the maintainer vote. As soon as you get +2, +1, +1 (from GCB) you can submit 
> the patch while kokoro is running (because of the maintainer vote).
>   2.  I am trying to be diligent and I am waiting for kokoro in any case (+2 
> +1 +1 +1) I might for example break kokoro and prevent a user from submitting 
> his own patch
>
>
> Considering this, I'd like to ask: which is the removal plan for kokoro?
>
> Kind Regards
>
> Giacomo
>
>
>
>
> IMPORTANT NOTICE: The contents of this email and any attachments are 
> confidential and may also be privileged. If you are not the intended 
> 

Re: [gem5-dev] Removing kokoro runs

2020-03-31 Thread Jason Lowe-Power
A couple of things... Bobby can correct me if I'm wrong.

1. GCB and kokoro should be running *the same tests*. So they should always
have the same result. There's no need to wait for kokoro if you have a +1
from GCB.
2. The migration is still in progress. There are a couple of loose ends we
need to tie up before turning off kokoro.
  - Getting the logs to be publicly available (see below)
  - Requiring a maintainer +1 before running GCB (this is needed to cut
down on our costs... right now, we're spending between $10 and $60 per day
depending on the number of changesets.
  - Running in batches instead of every time something is pushed. Right
now, if you push two versions of the same changeset back to back we test
both of them... we need to stop doing that. This isn't an "automatic"
feature of GCB, so we're working on our own implementation of batching.
3. The permissions are something we're working on. GCB does not allow us to
make the logs public. Seems like an obvious important feature, but we can't
find a way. We're working on a system that will automatically dump those
logs into a publicly available bucket. We'll make sure this done before we
turn off kokoro.

At a higher level... it's turned out to be a lot more engineering work to
get GCB + gerrit working for our use case of CI testing. If anyone else has
expertise here and would like to contribute to help us get this to
production quality, we would appreciate it!

Cheers,
Jason

On Tue, Mar 31, 2020 at 7:38 AM Ciro Santilli  wrote:

> Yes, I am logged in.
> --
> *From:* Giacomo Travaglini 
> *Sent:* Tuesday, March 31, 2020 3:29 PM
> *To:* Nils Asmussen ; gem5 Developer List <
> gem5-dev@gem5.org>; Ciro Santilli ; Jason
> Lowe-Power ; Bobby Bruce 
> *Subject:* RE: [gem5-dev] Removing kokoro runs
>
> Have you tried to login?
>
> Giacomo
>
> -Original Message-
> From: Nils Asmussen 
> Sent: 31 March 2020 15:27
> To: gem5 Developer List ; Ciro Santilli <
> ciro.santi...@arm.com>; Jason Lowe-Power ; Bobby
> Bruce ; Giacomo Travaglini  >
> Subject: Re: [gem5-dev] Removing kokoro runs
>
> Hi,
>
> same for me. Google says the permission "cloudbuild.builds.get" is missing.
>
> Best regards,
> Nils
>
>
> On 3/31/20 4:23 PM, Ciro Santilli wrote:
> > Since Giacomo started this thread, I would also want to chime in a
> related question: are you able to see GCB run logs?
> >
> > E.g. at: https://gem5-review.googlesource.com/c/public/gem5/+/27315 GCB
> links to
> https://console.cloud.google.com/cloud-build/builds/bbd716e1-a572-4c69-8c99-612df1755898?project=345032938727=1
> but when I visit that I get: "You do not have sufficient permissions to
> view this page".
> >
> > Do others reproduce/is it expected?
> > 
> > From: gem5-dev  on behalf of Giacomo
> Travaglini 
> > Sent: Tuesday, March 31, 2020 1:21 PM
> > To: gem5-dev@gem5.org ; Jason Lowe-Power <
> ja...@lowepower.com>; Bobby Bruce 
> > Subject: [gem5-dev] Removing kokoro runs
> >
> > Hi,
> >
> > I have noticed we have started using the Google Cloud service to run our
> pre-submit regressions.
> > At the moment this is happening in parallel with kokoro.
> >
> > Few things to point out:
> >
> >
> >   1.  It is actually possible now to submit a patch without kokoro. GCB
> is faster than kokoro and starts as soon as the patch is pushed regardless
> of the maintainer vote. As soon as you get +2, +1, +1 (from GCB) you can
> submit the patch while kokoro is running (because of the maintainer vote).
> >   2.  I am trying to be diligent and I am waiting for kokoro in any case
> (+2 +1 +1 +1) I might for example break kokoro and prevent a user from
> submitting his own patch
> >
> >
> > Considering this, I'd like to ask: which is the removal plan for kokoro?
> >
> > Kind Regards
> >
> > Giacomo
> >
> >
> >
> >
> > 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
> >
>
>
>
> 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

Re: [gem5-dev] Removing kokoro runs

2020-03-31 Thread Ciro Santilli
Yes, I am logged in.

From: Giacomo Travaglini 
Sent: Tuesday, March 31, 2020 3:29 PM
To: Nils Asmussen ; gem5 Developer List 
; Ciro Santilli ; Jason Lowe-Power 
; Bobby Bruce 
Subject: RE: [gem5-dev] Removing kokoro runs

Have you tried to login?

Giacomo

-Original Message-
From: Nils Asmussen 
Sent: 31 March 2020 15:27
To: gem5 Developer List ; Ciro Santilli 
; Jason Lowe-Power ; Bobby Bruce 
; Giacomo Travaglini 
Subject: Re: [gem5-dev] Removing kokoro runs

Hi,

same for me. Google says the permission "cloudbuild.builds.get" is missing.

Best regards,
Nils


On 3/31/20 4:23 PM, Ciro Santilli wrote:
> Since Giacomo started this thread, I would also want to chime in a related 
> question: are you able to see GCB run logs?
>
> E.g. at: https://gem5-review.googlesource.com/c/public/gem5/+/27315 GCB links 
> to 
> https://console.cloud.google.com/cloud-build/builds/bbd716e1-a572-4c69-8c99-612df1755898?project=345032938727=1
>   but when I visit that I get: "You do not have sufficient permissions to 
> view this page".
>
> Do others reproduce/is it expected?
> 
> From: gem5-dev  on behalf of Giacomo Travaglini 
> 
> Sent: Tuesday, March 31, 2020 1:21 PM
> To: gem5-dev@gem5.org ; Jason Lowe-Power 
> ; Bobby Bruce 
> Subject: [gem5-dev] Removing kokoro runs
>
> Hi,
>
> I have noticed we have started using the Google Cloud service to run our 
> pre-submit regressions.
> At the moment this is happening in parallel with kokoro.
>
> Few things to point out:
>
>
>   1.  It is actually possible now to submit a patch without kokoro. GCB is 
> faster than kokoro and starts as soon as the patch is pushed regardless of 
> the maintainer vote. As soon as you get +2, +1, +1 (from GCB) you can submit 
> the patch while kokoro is running (because of the maintainer vote).
>   2.  I am trying to be diligent and I am waiting for kokoro in any case (+2 
> +1 +1 +1) I might for example break kokoro and prevent a user from submitting 
> his own patch
>
>
> Considering this, I'd like to ask: which is the removal plan for kokoro?
>
> Kind Regards
>
> Giacomo
>
>
>
>
> 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
>



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

Re: [gem5-dev] Removing kokoro runs

2020-03-31 Thread Giacomo Travaglini
Have you tried to login?

Giacomo

-Original Message-
From: Nils Asmussen 
Sent: 31 March 2020 15:27
To: gem5 Developer List ; Ciro Santilli 
; Jason Lowe-Power ; Bobby Bruce 
; Giacomo Travaglini 
Subject: Re: [gem5-dev] Removing kokoro runs

Hi,

same for me. Google says the permission "cloudbuild.builds.get" is missing.

Best regards,
Nils


On 3/31/20 4:23 PM, Ciro Santilli wrote:
> Since Giacomo started this thread, I would also want to chime in a related 
> question: are you able to see GCB run logs?
>
> E.g. at: https://gem5-review.googlesource.com/c/public/gem5/+/27315 GCB links 
> to 
> https://console.cloud.google.com/cloud-build/builds/bbd716e1-a572-4c69-8c99-612df1755898?project=345032938727=1
>   but when I visit that I get: "You do not have sufficient permissions to 
> view this page".
>
> Do others reproduce/is it expected?
> 
> From: gem5-dev  on behalf of Giacomo Travaglini 
> 
> Sent: Tuesday, March 31, 2020 1:21 PM
> To: gem5-dev@gem5.org ; Jason Lowe-Power 
> ; Bobby Bruce 
> Subject: [gem5-dev] Removing kokoro runs
>
> Hi,
>
> I have noticed we have started using the Google Cloud service to run our 
> pre-submit regressions.
> At the moment this is happening in parallel with kokoro.
>
> Few things to point out:
>
>
>   1.  It is actually possible now to submit a patch without kokoro. GCB is 
> faster than kokoro and starts as soon as the patch is pushed regardless of 
> the maintainer vote. As soon as you get +2, +1, +1 (from GCB) you can submit 
> the patch while kokoro is running (because of the maintainer vote).
>   2.  I am trying to be diligent and I am waiting for kokoro in any case (+2 
> +1 +1 +1) I might for example break kokoro and prevent a user from submitting 
> his own patch
>
>
> Considering this, I'd like to ask: which is the removal plan for kokoro?
>
> Kind Regards
>
> Giacomo
>
>
>
>
> 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
>



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

Re: [gem5-dev] Removing kokoro runs

2020-03-31 Thread Nils Asmussen
Hi,

same for me. Google says the permission "cloudbuild.builds.get" is missing.

Best regards,
Nils


On 3/31/20 4:23 PM, Ciro Santilli wrote:
> Since Giacomo started this thread, I would also want to chime in a related 
> question: are you able to see GCB run logs?
> 
> E.g. at: https://gem5-review.googlesource.com/c/public/gem5/+/27315 GCB links 
> to 
> https://console.cloud.google.com/cloud-build/builds/bbd716e1-a572-4c69-8c99-612df1755898?project=345032938727=1
>   but when I visit that I get: "You do not have sufficient permissions to 
> view this page".
> 
> Do others reproduce/is it expected?
> 
> From: gem5-dev  on behalf of Giacomo Travaglini 
> 
> Sent: Tuesday, March 31, 2020 1:21 PM
> To: gem5-dev@gem5.org ; Jason Lowe-Power 
> ; Bobby Bruce 
> Subject: [gem5-dev] Removing kokoro runs
> 
> Hi,
> 
> I have noticed we have started using the Google Cloud service to run our 
> pre-submit regressions.
> At the moment this is happening in parallel with kokoro.
> 
> Few things to point out:
> 
> 
>   1.  It is actually possible now to submit a patch without kokoro. GCB is 
> faster than kokoro and starts as soon as the patch is pushed regardless of 
> the maintainer vote. As soon as you get +2, +1, +1 (from GCB) you can submit 
> the patch while kokoro is running (because of the maintainer vote).
>   2.  I am trying to be diligent and I am waiting for kokoro in any case (+2 
> +1 +1 +1) I might for example break kokoro and prevent a user from submitting 
> his own patch
> 
> 
> Considering this, I'd like to ask: which is the removal plan for kokoro?
> 
> Kind Regards
> 
> Giacomo
> 
> 
> 
> 
> 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
> 



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

Re: [gem5-dev] Removing kokoro runs

2020-03-31 Thread Ciro Santilli
Since Giacomo started this thread, I would also want to chime in a related 
question: are you able to see GCB run logs?

E.g. at: https://gem5-review.googlesource.com/c/public/gem5/+/27315 GCB links 
to 
https://console.cloud.google.com/cloud-build/builds/bbd716e1-a572-4c69-8c99-612df1755898?project=345032938727=1
  but when I visit that I get: "You do not have sufficient permissions to view 
this page".

Do others reproduce/is it expected?

From: gem5-dev  on behalf of Giacomo Travaglini 

Sent: Tuesday, March 31, 2020 1:21 PM
To: gem5-dev@gem5.org ; Jason Lowe-Power 
; Bobby Bruce 
Subject: [gem5-dev] Removing kokoro runs

Hi,

I have noticed we have started using the Google Cloud service to run our 
pre-submit regressions.
At the moment this is happening in parallel with kokoro.

Few things to point out:


  1.  It is actually possible now to submit a patch without kokoro. GCB is 
faster than kokoro and starts as soon as the patch is pushed regardless of the 
maintainer vote. As soon as you get +2, +1, +1 (from GCB) you can submit the 
patch while kokoro is running (because of the maintainer vote).
  2.  I am trying to be diligent and I am waiting for kokoro in any case (+2 +1 
+1 +1) I might for example break kokoro and prevent a user from submitting his 
own patch


Considering this, I'd like to ask: which is the removal plan for kokoro?

Kind Regards

Giacomo




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

[gem5-dev] Change in gem5/gem5[develop]: arch-arm, dev-arm: WakeRequest implementation

2020-03-31 Thread Giacomo Travaglini (Gerrit)
Giacomo Travaglini has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/26810 )


Change subject: arch-arm, dev-arm: WakeRequest implementation
..

arch-arm, dev-arm: WakeRequest implementation

This patch provides a GIC WakeRequest implementation based on GICv3 and
FVPBasePwrCtrl models. When GICR_WAKER.ProcessorSleep is set to 1 for a
certain PE, any pending interrupt coming from the Redistributor asserts
a WakeRequest signal; if PwrStatus.WEN is set, this brings up the PE.

Change-Id: I5e8b7f0e9f7706dfcc7d2e0857f4c3b86cdc04ca
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26810
Tested-by: Gem5 Cloud Project GCB service account  
<345032938...@cloudbuild.gserviceaccount.com>

Tested-by: kokoro 
Reviewed-by: Nikos Nikoleris 
Maintainer: Nikos Nikoleris 
---
M src/arch/arm/system.cc
M src/arch/arm/system.hh
M src/dev/arm/fvp_base_pwr_ctrl.cc
M src/dev/arm/fvp_base_pwr_ctrl.hh
M src/dev/arm/gic_v3.cc
M src/dev/arm/gic_v3.hh
M src/dev/arm/gic_v3_cpu_interface.cc
M src/dev/arm/gic_v3_cpu_interface.hh
M src/dev/arm/gic_v3_redistributor.cc
9 files changed, 136 insertions(+), 12 deletions(-)

Approvals:
  Nikos Nikoleris: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass
  Gem5 Cloud Project GCB service account: Regressions pass



diff --git a/src/arch/arm/system.cc b/src/arch/arm/system.cc
index 5d261a7..b03f0f5 100644
--- a/src/arch/arm/system.cc
+++ b/src/arch/arm/system.cc
@@ -214,6 +214,22 @@
 pwr_ctrl->clearStandByWfi(tc);
 }

+bool
+ArmSystem::callSetWakeRequest(ThreadContext *tc)
+{
+if (FVPBasePwrCtrl *pwr_ctrl = getArmSystem(tc)->getPowerController())
+return pwr_ctrl->setWakeRequest(tc);
+else
+return true;
+}
+
+void
+ArmSystem::callClearWakeRequest(ThreadContext *tc)
+{
+if (FVPBasePwrCtrl *pwr_ctrl = getArmSystem(tc)->getPowerController())
+pwr_ctrl->clearWakeRequest(tc);
+}
+
 ArmSystem *
 ArmSystemParams::create()
 {
diff --git a/src/arch/arm/system.hh b/src/arch/arm/system.hh
index 364a804..1339c1c 100644
--- a/src/arch/arm/system.hh
+++ b/src/arch/arm/system.hh
@@ -327,6 +327,16 @@

 /** Make a call to notify the power controller of STANDBYWFI  
deassertion */

 static void callClearStandByWfi(ThreadContext *tc);
+
+/**
+ * Notify the power controller of WAKEREQUEST assertion. Returns true
+ * if WAKEREQUEST is enabled as a power-on mechanism, and the core is  
now

+ * powered, false otherwise
+ */
+static bool callSetWakeRequest(ThreadContext *tc);
+
+/** Notify the power controller of WAKEREQUEST deassertion */
+static void callClearWakeRequest(ThreadContext *tc);
 };

 #endif
diff --git a/src/dev/arm/fvp_base_pwr_ctrl.cc  
b/src/dev/arm/fvp_base_pwr_ctrl.cc

index 88708bd..a6650b8 100644
--- a/src/dev/arm/fvp_base_pwr_ctrl.cc
+++ b/src/dev/arm/fvp_base_pwr_ctrl.cc
@@ -91,6 +91,34 @@
 pwrs->pwfi = 0;
 }

+bool
+FVPBasePwrCtrl::setWakeRequest(ThreadContext *const tc)
+{
+PwrStatus *pwrs = getCorePwrStatus(tc);
+
+if (!pwrs->pwk)
+DPRINTF(FVPBasePwrCtrl, "FVPBasePwrCtrl::setWakeRequest:  
WakeRequest "

+"asserted for core %d\n", tc->contextId());
+pwrs->pwk = 1;
+if (!pwrs->l0 && pwrs->wen) {
+pwrs->wk = WK_GICWR;
+powerCoreOn(tc, pwrs);
+return true;
+}
+return false;
+}
+
+void
+FVPBasePwrCtrl::clearWakeRequest(ThreadContext *const tc)
+{
+PwrStatus *pwrs = getCorePwrStatus(tc);
+
+if (pwrs->pwk)
+DPRINTF(FVPBasePwrCtrl, "FVPBasePwrCtrl::clearWakeRequest: "
+"WakeRequest deasserted for core %d\n", tc->contextId());
+pwrs->pwk = 0;
+}
+
 Tick
 FVPBasePwrCtrl::read(PacketPtr pkt)
 {
@@ -276,6 +304,7 @@
 DPRINTF(FVPBasePwrCtrl, "FVPBasePwrCtrl::startCoreUp: Starting  
core %d "

 "from the power controller\n", tc->contextId());
 clearStandByWfi(tc);
+clearWakeRequest(tc);

 // InitCPU
 Reset().invoke(tc);
diff --git a/src/dev/arm/fvp_base_pwr_ctrl.hh  
b/src/dev/arm/fvp_base_pwr_ctrl.hh

index df0b686..aa446a8 100644
--- a/src/dev/arm/fvp_base_pwr_ctrl.hh
+++ b/src/dev/arm/fvp_base_pwr_ctrl.hh
@@ -51,11 +51,6 @@
  * @file
  * This class implements the base power controller for FVP-based
  * platforms. Based on Fast Models version 11.8.
- *
- * Limitations:
- * - Level 2 affinity is not implemented -> PSYSR.L2 is RAZ
- * - WakeRequests are not modelled by GICv3 -> PSYSR.WEN is always 0
- * - PSYSR.WK can only be 0b00 (Cold power-on) and 0b10 (Wake by PPONR)
  */
 class FVPBasePwrCtrl : public BasicPioDevice
 {
@@ -78,6 +73,21 @@
  */
 void clearStandByWfi(ThreadContext *const tc);

+/**
+ * Triggered by the GIC when GICR_WAKER.ProcessorSleep is 1 and there  
are

+ * pending interrupts for the core
+ * @param tc Thread context representing the core
+ * @return true if the core is 

[gem5-dev] Change in gem5/gem5[develop]: util: Remove the annotation pseudo ops symbols from the m5 utility.

2020-03-31 Thread Gabe Black (Gerrit)
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27203 )


Change subject: util: Remove the annotation pseudo ops symbols from the m5  
utility.

..

util: Remove the annotation pseudo ops symbols from the m5 utility.

These pseudo ops have been removed and will no longer work with gem5.

Change-Id: Ie07a320db528cb5c628f2c194fb1672b1fcae39a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27203
Tested-by: kokoro 
Reviewed-by: Giacomo Travaglini 
Reviewed-by: Daniel Carvalho 
Maintainer: Bobby R. Bruce 
---
M util/m5/m5op_arm.S
M util/m5/m5op_arm_A64.S
2 files changed, 0 insertions(+), 6 deletions(-)

Approvals:
  Giacomo Travaglini: Looks good to me, approved
  Daniel Carvalho: Looks good to me, but someone else must approve
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/util/m5/m5op_arm.S b/util/m5/m5op_arm.S
index 2176ec6..c0487c0 100644
--- a/util/m5/m5op_arm.S
+++ b/util/m5/m5op_arm.S
@@ -62,6 +62,3 @@
 .text
 #define M5OP(name, func, subfunc) m5op_func name, func, subfunc
 M5OP_FOREACH
-
-#define M5_ANNOTATION(name, ann) m5op_func name, M5OP_ANNOTATE, ann
-M5OP_FOREACH_ANNOTATION
diff --git a/util/m5/m5op_arm_A64.S b/util/m5/m5op_arm_A64.S
index 76d6f19..09d31d3 100644
--- a/util/m5/m5op_arm_A64.S
+++ b/util/m5/m5op_arm_A64.S
@@ -61,6 +61,3 @@
 .text
 #define M5OP(name, func, subfunc) m5op_func name, func, subfunc
 M5OP_FOREACH
-
-#define M5_ANNOTATION(name, ann) m5op_func name, M5OP_ANNOTATE, ann
-M5OP_FOREACH_ANNOTATION

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27203
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ie07a320db528cb5c628f2c194fb1672b1fcae39a
Gerrit-Change-Number: 27203
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Earl Ou 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Yu-hsin Wang 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Removing kokoro runs

2020-03-31 Thread Giacomo Travaglini
Hi,

I have noticed we have started using the Google Cloud service to run our 
pre-submit regressions.
At the moment this is happening in parallel with kokoro.

Few things to point out:


  1.  It is actually possible now to submit a patch without kokoro. GCB is 
faster than kokoro and starts as soon as the patch is pushed regardless of the 
maintainer vote. As soon as you get +2, +1, +1 (from GCB) you can submit the 
patch while kokoro is running (because of the maintainer vote).
  2.  I am trying to be diligent and I am waiting for kokoro in any case (+2 +1 
+1 +1) I might for example break kokoro and prevent a user from submitting his 
own patch


Considering this, I'd like to ask: which is the removal plan for kokoro?

Kind Regards

Giacomo




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] Change in gem5/gem5[develop]: tests: move threads test to the new framework

2020-03-31 Thread Ciro Santilli (Gerrit)
Ciro Santilli has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27310 )



Change subject: tests: move threads test to the new framework
..

tests: move threads test to the new framework

Change-Id: Iaebe50c6262c33761778e9288ffa6b0c5b94c038
---
R tests/test-progs/std_thread.cpp
D tests/test-progs/threads/bin/x86/linux/threads
D tests/test-progs/threads/src/Makefile
3 files changed, 2 insertions(+), 5 deletions(-)



diff --git a/tests/test-progs/threads/src/threads.cpp  
b/tests/test-progs/std_thread.cpp

similarity index 97%
rename from tests/test-progs/threads/src/threads.cpp
rename to tests/test-progs/std_thread.cpp
index b844e77..b1e8468 100644
--- a/tests/test-progs/threads/src/threads.cpp
+++ b/tests/test-progs/std_thread.cpp
@@ -44,7 +44,7 @@

 int main(int argc, char *argv[])
 {
-unsigned num_values;
+int num_values;
 if (argc == 1) {
 num_values = 100;
 } else if (argc == 2) {
@@ -58,7 +58,7 @@
 return 1;
 }

-unsigned cpus = thread::hardware_concurrency();
+int cpus = thread::hardware_concurrency();

 cout << "Running on " << cpus << " cores. ";
 cout << "with " << num_values << " values" << endl;
diff --git a/tests/test-progs/threads/bin/x86/linux/threads  
b/tests/test-progs/threads/bin/x86/linux/threads

deleted file mode 100755
index 8354fd6..000
--- a/tests/test-progs/threads/bin/x86/linux/threads
+++ /dev/null
Binary files differ
diff --git a/tests/test-progs/threads/src/Makefile  
b/tests/test-progs/threads/src/Makefile

deleted file mode 100644
index e5abfd0..000
--- a/tests/test-progs/threads/src/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-
-../bin/x86/linux/threads: threads.cpp
-   g++ -o ../bin/x86/linux/threads threads.cpp -pthread -std=c++11

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27310
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Iaebe50c6262c33761778e9288ffa6b0c5b94c038
Gerrit-Change-Number: 27310
Gerrit-PatchSet: 1
Gerrit-Owner: Ciro Santilli 
Gerrit-MessageType: newchange
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[develop]: tests: remove hello, already present in new framework

2020-03-31 Thread Ciro Santilli (Gerrit)
Ciro Santilli has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27315 )



Change subject: tests: remove hello, already present in new framework
..

tests: remove hello, already present in new framework

Change-Id: I9ef75476c795cf91015b3ffb249fa77825eac1cb
---
D tests/test-progs/hello/.gitignore
D tests/test-progs/hello/bin/arm/linux/hello
D tests/test-progs/hello/bin/mips/linux/hello
D tests/test-progs/hello/bin/power/linux/hello
D tests/test-progs/hello/bin/riscv/linux/hello
D tests/test-progs/hello/bin/sparc/linux/hello
D tests/test-progs/hello/bin/x86/linux/hello
D tests/test-progs/hello/bin/x86/linux/hello32
D tests/test-progs/hello/src/Makefile.arm
D tests/test-progs/hello/src/Makefile.x86
D tests/test-progs/hello/src/hello.c
11 files changed, 0 insertions(+), 103 deletions(-)



diff --git a/tests/test-progs/hello/.gitignore  
b/tests/test-progs/hello/.gitignore

deleted file mode 100644
index 48c31c3..000
--- a/tests/test-progs/hello/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-bin/arm/linux/hello32-static
-bin/arm/linux/hello64-static
-
-bin/x86/linux/hello32-static
-bin/x86/linux/hello64-static
-bin/x86/linux/hello64-dynamic
-
-src/dockcross*
-src/*-dynamic
-src/*-static
diff --git a/tests/test-progs/hello/bin/arm/linux/hello  
b/tests/test-progs/hello/bin/arm/linux/hello

deleted file mode 100755
index 831ea7e..000
--- a/tests/test-progs/hello/bin/arm/linux/hello
+++ /dev/null
Binary files differ
diff --git a/tests/test-progs/hello/bin/mips/linux/hello  
b/tests/test-progs/hello/bin/mips/linux/hello

deleted file mode 100755
index a3db001..000
--- a/tests/test-progs/hello/bin/mips/linux/hello
+++ /dev/null
Binary files differ
diff --git a/tests/test-progs/hello/bin/power/linux/hello  
b/tests/test-progs/hello/bin/power/linux/hello

deleted file mode 100755
index 6619ae3..000
--- a/tests/test-progs/hello/bin/power/linux/hello
+++ /dev/null
Binary files differ
diff --git a/tests/test-progs/hello/bin/riscv/linux/hello  
b/tests/test-progs/hello/bin/riscv/linux/hello

deleted file mode 100755
index b26d16c..000
--- a/tests/test-progs/hello/bin/riscv/linux/hello
+++ /dev/null
Binary files differ
diff --git a/tests/test-progs/hello/bin/sparc/linux/hello  
b/tests/test-progs/hello/bin/sparc/linux/hello

deleted file mode 100755
index e254ae3..000
--- a/tests/test-progs/hello/bin/sparc/linux/hello
+++ /dev/null
Binary files differ
diff --git a/tests/test-progs/hello/bin/x86/linux/hello  
b/tests/test-progs/hello/bin/x86/linux/hello

deleted file mode 100755
index a3ec8dc..000
--- a/tests/test-progs/hello/bin/x86/linux/hello
+++ /dev/null
Binary files differ
diff --git a/tests/test-progs/hello/bin/x86/linux/hello32  
b/tests/test-progs/hello/bin/x86/linux/hello32

deleted file mode 100755
index 072773d..000
--- a/tests/test-progs/hello/bin/x86/linux/hello32
+++ /dev/null
Binary files differ
diff --git a/tests/test-progs/hello/src/Makefile.arm  
b/tests/test-progs/hello/src/Makefile.arm

deleted file mode 100644
index 1f02246..000
--- a/tests/test-progs/hello/src/Makefile.arm
+++ /dev/null
@@ -1,26 +0,0 @@
-SERVER_USER=
-SERVER_PATH=/z/www/htdocs/dist/current/test-progs/hello/bin/arm/linux
-FETCH_PATH=http://dist.gem5.org/dist/current/test-progs/hello/bin/arm/linux
-UPLOAD_LOCATION=$(SERVER_USER)daystrom.gem5.org:$(SERVER_PATH)
-
-all: hello64-static hello32-static
-
-upload: hello64-static hello32-static
-   scp hello64-static hello32-static $(UPLOAD_LOCATION)
-
-hello64-static: hello.c dockcross-arm64
-   ./dockcross-arm64 bash -c '$$CC hello.c -o hello64-static -static'
-
-hello32-static: hello.c dockcross-armv7
-   ./dockcross-armv7 bash -c '$$CC hello.c -o hello32-static -static'
-
-dockcross-arm64:
-   docker run --rm dockcross/linux-arm64 > ./dockcross-arm64
-   chmod +x ./dockcross-arm64
-
-dockcross-armv7:
-   docker run --rm dockcross/linux-armv7 > ./dockcross-armv7
-   chmod +x ./dockcross-armv7
-
-clean:
-   rm -f dockcross* hello64-static hello32-static
diff --git a/tests/test-progs/hello/src/Makefile.x86  
b/tests/test-progs/hello/src/Makefile.x86

deleted file mode 100644
index 3df2d23..000
--- a/tests/test-progs/hello/src/Makefile.x86
+++ /dev/null
@@ -1,31 +0,0 @@
-SERVER_USER=
-SERVER_PATH=/z/www/htdocs/dist/current/test-progs/hello/bin/x86/linux
-FETCH_PATH=http://dist.gem5.org/dist/current/test-progs/hello/bin/x86/linux
-
-UPLOAD_LOCATION=$(SERVER_USER)daystrom.gem5.org:$(SERVER_PATH)
-
-all: hello64-static hello64-dynamic hello32-static
-
-
-upload: hello64-static hello64-dynamic hello32-static
-   scp hello64-static hello64-dynamic hello32-static $(UPLOAD_LOCATION)
-
-hello64-static: hello.c dockcross-x64
-   ./dockcross-x64 bash -c '$$CC hello.c -o hello64-static -static'
-
-hello64-dynamic: hello.c dockcross-x64
-   ./dockcross-x64 bash -c '$$CC hello.c -o hello64-dynamic'
-

[gem5-dev] Change in gem5/gem5[develop]: tests: move page-access-wrap test to the new framework

2020-03-31 Thread Ciro Santilli (Gerrit)
Ciro Santilli has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27314 )



Change subject: tests: move page-access-wrap test to the new framework
..

tests: move page-access-wrap test to the new framework

Change-Id: Ie1d897b5733c8a8b62bba6438693719e76964dde
---
D tests/test-progs/page-access-wrap/Makefile
R tests/test-progs/page_access_wrap.cpp
2 files changed, 2 insertions(+), 22 deletions(-)



diff --git a/tests/test-progs/page-access-wrap/Makefile  
b/tests/test-progs/page-access-wrap/Makefile

deleted file mode 100644
index 41e7a18..000
--- a/tests/test-progs/page-access-wrap/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-
-CPP := g++
-
-TEST_OBJS := page-access-wrap.o
-TEST_PROGS := $(TEST_OBJS:.o=)
-
-#  Rules  
==

-
-.PHONY: default clean
-
-default: $(TEST_PROGS)
-
-clean:
-   $(RM)  $(TEST_OBJS) $(TEST_PROGS)
-
-$(TEST_PROGS): $(TEST_OBJS)
-   $(CPP)  -static -o $@  $@.o
-
-%.o: %.c Makefile
-   $(CPP) -c -o $@ $*.c -msse3
diff --git a/tests/test-progs/page-access-wrap/page-access-wrap.cpp  
b/tests/test-progs/page_access_wrap.cpp

similarity index 95%
rename from tests/test-progs/page-access-wrap/page-access-wrap.cpp
rename to tests/test-progs/page_access_wrap.cpp
index 6e536aa..8d8b553 100644
--- a/tests/test-progs/page-access-wrap/page-access-wrap.cpp
+++ b/tests/test-progs/page_access_wrap.cpp
@@ -57,8 +57,8 @@
 uint64_t boundary_offset = random_boundary * page_size;
 uint64_t boundary_last_byte = boundary_offset + last_byte;
 uint32_t *poke = reinterpret_cast(mem +  
boundary_last_byte);

-printf("%p\n", poke);
-uint32_t value = *poke;
+printf("%p\n", (void *)poke);
+__asm__ __volatile__("" : "=r" (*poke) : : );
 }

 return 0;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27314
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ie1d897b5733c8a8b62bba6438693719e76964dde
Gerrit-Change-Number: 27314
Gerrit-PatchSet: 1
Gerrit-Owner: Ciro Santilli 
Gerrit-MessageType: newchange
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[develop]: tests: move m5op_arm_A64.S to m5op_arm64.S

2020-03-31 Thread Ciro Santilli (Gerrit)
Ciro Santilli has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27307 )



Change subject: tests: move m5op_arm_A64.S to m5op_arm64.S
..

tests: move m5op_arm_A64.S to m5op_arm64.S

This more regular name makes it easier to automate from the various
Makefiles that require m5ops.

Change-Id: Id23965cfc03f1152f4aad21db6a3dcd42b0100fb
---
M util/m5/Android.mk
R util/m5/Makefile.arm64
R util/m5/m5op_arm64.S
3 files changed, 4 insertions(+), 4 deletions(-)



diff --git a/util/m5/Android.mk b/util/m5/Android.mk
index 34fb10e..e344864 100644
--- a/util/m5/Android.mk
+++ b/util/m5/Android.mk
@@ -13,7 +13,7 @@
 m5op_arm.S
 else ifeq ($(TARGET_ARCH),arm64)
 LOCAL_SRC_FILES += \
-m5op_arm_A64.S
+m5op_arm64.S
 else
 $(error "Unsupported TARGET_ARCH $(TARGET_ARCH)")
 endif
diff --git a/util/m5/Makefile.aarch64 b/util/m5/Makefile.arm64
similarity index 96%
rename from util/m5/Makefile.aarch64
rename to util/m5/Makefile.arm64
index f0b6494..a5e5115 100644
--- a/util/m5/Makefile.aarch64
+++ b/util/m5/Makefile.arm64
@@ -55,10 +55,10 @@
-I../../include -march=armv8-a
 LDFLAGS=-static -L. -lm5

-LIB_OBJS=m5op_arm_A64.o m5_mmap.o
+LIB_OBJS=m5op_arm64.o m5_mmap.o
 OBJS=m5.o
-JNI_OBJS=m5op_arm_A64.o jni_gem5Op.o
-LUA_OBJS=lua_gem5Op.o m5op_arm_A64.o m5_mmap.o
+JNI_OBJS=m5op_arm64.o jni_gem5Op.o
+LUA_OBJS=lua_gem5Op.o m5op_arm64.o m5_mmap.o

 ### Need to install lua5.1 library to compile gem5OpLua.so
 LUA_HEADER_INCLUDE=$(shell pkg-config --cflags lua51)  
-I/usr/include/x86_64-linux-gnu

diff --git a/util/m5/m5op_arm_A64.S b/util/m5/m5op_arm64.S
similarity index 100%
rename from util/m5/m5op_arm_A64.S
rename to util/m5/m5op_arm64.S

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27307
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Id23965cfc03f1152f4aad21db6a3dcd42b0100fb
Gerrit-Change-Number: 27307
Gerrit-PatchSet: 1
Gerrit-Owner: Ciro Santilli 
Gerrit-MessageType: newchange
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[develop]: tests: move mwait test to the new framework

2020-03-31 Thread Ciro Santilli (Gerrit)
Ciro Santilli has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27312 )



Change subject: tests: move mwait test to the new framework
..

tests: move mwait test to the new framework

Change-Id: I11e9a130d9547dc23aa379730e2e7df3d493d6fc
---
D tests/test-progs/mwait/Makefile
R tests/test-progs/x86/mwait.c
2 files changed, 5 insertions(+), 23 deletions(-)



diff --git a/tests/test-progs/mwait/Makefile  
b/tests/test-progs/mwait/Makefile

deleted file mode 100644
index 6b88811..000
--- a/tests/test-progs/mwait/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-
-CPP := g++
-
-TEST_OBJS := mwait.o
-TEST_PROGS := $(TEST_OBJS:.o=)
-
-#  Rules  
==

-
-.PHONY: default clean
-
-default: $(TEST_PROGS)
-
-clean:
-   $(RM)  $(TEST_OBJS) $(TEST_PROGS)
-
-$(TEST_PROGS): $(TEST_OBJS)
-   $(CPP)  -static -o $@  $@.o pthread.o
-
-%.o: %.c Makefile
-   $(CPP) -c -o $@ $*.c -msse3
diff --git a/tests/test-progs/mwait/mwait.c b/tests/test-progs/x86/mwait.c
similarity index 95%
rename from tests/test-progs/mwait/mwait.c
rename to tests/test-progs/x86/mwait.c
index e1b2035..62bf8c8 100644
--- a/tests/test-progs/mwait/mwait.c
+++ b/tests/test-progs/x86/mwait.c
@@ -14,6 +14,7 @@

 void *DoWork1(void *threadid)
 {
+(void)threadid;
 flags[0] = flags[0] + 1;
 wait[0] = 0;
 pthread_exit(0);
@@ -21,16 +22,17 @@

 void *DoWork2(void *threadid)
 {
+(void)threadid;
 pthread_mutex_lock ();
 flags[0] = flags[0] + 1;
 pthread_mutex_unlock ();
 pthread_exit(0);
 }

-
+//
 // Program main
-
-int main( int argc, char** argv)
+//
+int main(void)
 {
 // stuff for thread
 pthread_t threads[1];

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27312
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I11e9a130d9547dc23aa379730e2e7df3d493d6fc
Gerrit-Change-Number: 27312
Gerrit-PatchSet: 1
Gerrit-Owner: Ciro Santilli 
Gerrit-MessageType: newchange
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[develop]: tests: move pthread tests to the new framework

2020-03-31 Thread Ciro Santilli (Gerrit)
Ciro Santilli has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27309 )



Change subject: tests: move pthread tests to the new framework
..

tests: move pthread tests to the new framework

Change-Id: I7f724c681e71d12c3bc0fdbbfd851f3e238fdad0
---
D tests/test-progs/pthread/Makefile.aarch32
D tests/test-progs/pthread/Makefile.aarch64
D tests/test-progs/pthread/Makefile.common
D tests/test-progs/pthread/Makefile.riscv
D tests/test-progs/pthread/Makefile.x86
R tests/test-progs/pthread_atomic.cpp
R tests/test-progs/pthread_cond.cpp
R tests/test-progs/pthread_create_para.cpp
R tests/test-progs/pthread_create_seq.cpp
R tests/test-progs/pthread_mutex.cpp
R tests/test-progs/pthread_std_condition_variable.cpp
R tests/test-progs/pthread_std_mutex.cpp
R tests/test-progs/pthread_std_thread.cpp
13 files changed, 9 insertions(+), 229 deletions(-)



diff --git a/tests/test-progs/pthread/Makefile.aarch32  
b/tests/test-progs/pthread/Makefile.aarch32

deleted file mode 100644
index 1acb097..000
--- a/tests/test-progs/pthread/Makefile.aarch32
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (c) 2019 ARM Limited
-# All rights reserved.
-#
-# The license below extends only to copyright in the software and shall
-# not be construed as granting a license to any other intellectual
-# property including but not limited to intellectual property relating
-# to a hardware implementation of the functionality of the software
-# licensed hereunder.  You may use the software subject to the license
-# terms below provided that you ensure that this notice is replicated
-# unmodified and in its entirety in all distributions of the software,
-# modified or unmodified, in source code or in binary form.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met: redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer;
-# redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution;
-# neither the name of the copyright holders nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-CROSS_COMPILE = arm-linux-gnueabihf-
-BIN_DIR = bin.aarch32
-
--include Makefile.common
diff --git a/tests/test-progs/pthread/Makefile.aarch64  
b/tests/test-progs/pthread/Makefile.aarch64

deleted file mode 100644
index da30820..000
--- a/tests/test-progs/pthread/Makefile.aarch64
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (c) 2019 ARM Limited
-# All rights reserved.
-#
-# The license below extends only to copyright in the software and shall
-# not be construed as granting a license to any other intellectual
-# property including but not limited to intellectual property relating
-# to a hardware implementation of the functionality of the software
-# licensed hereunder.  You may use the software subject to the license
-# terms below provided that you ensure that this notice is replicated
-# unmodified and in its entirety in all distributions of the software,
-# modified or unmodified, in source code or in binary form.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met: redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer;
-# redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution;
-# neither the name of the copyright holders nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

[gem5-dev] Change in gem5/gem5[develop]: tests: move chdir-print test to the new framework

2020-03-31 Thread Ciro Santilli (Gerrit)
Ciro Santilli has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27313 )



Change subject: tests: move chdir-print test to the new framework
..

tests: move chdir-print test to the new framework

Change-Id: I4425d27940d6ae3853b15571466459857903018d
---
D tests/test-progs/chdir-print/Makefile
D tests/test-progs/chdir-print/README.txt
D tests/test-progs/chdir-print/chdir-print.c
A tests/test-progs/chdir_print.c
R tests/test-progs/stack_print.c
5 files changed, 153 insertions(+), 165 deletions(-)



diff --git a/tests/test-progs/chdir-print/Makefile  
b/tests/test-progs/chdir-print/Makefile

deleted file mode 100644
index 6a357d5..000
--- a/tests/test-progs/chdir-print/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-
-CPP := g++
-
-TEST_OBJS := chdir-print.o
-TEST_PROGS := $(TEST_OBJS:.o=)
-
-#  Rules  
==

-
-.PHONY: default clean
-
-default: $(TEST_PROGS)
-
-clean:
-   $(RM)  $(TEST_OBJS) $(TEST_PROGS)
-
-$(TEST_PROGS): $(TEST_OBJS)
-   $(CPP)  -static -o $@  $@.o
-
-%.o: %.c Makefile
-   $(CPP) -c -o $@ $*.c -msse3
diff --git a/tests/test-progs/chdir-print/README.txt  
b/tests/test-progs/chdir-print/README.txt

deleted file mode 100644
index b1e9213..000
--- a/tests/test-progs/chdir-print/README.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-# example test compile and run parameters
-# Note: the absolute path to the chdir-print binary should be specified
-# in the run command even if running from the same folder. This is needed
-# because chdir is executed before triggering a clone for the file read,
-# and the cloned process won't be able to find the executable if a relative
-# path is provided.
-
-# compile examples
-scons --default=X86 ./build/X86/gem5.opt PROTOCOL=MOESI_hammer
-scons --default=X86 ./build/X86/gem5.opt PROTOCOL=MESI_Three_Level
-
-# run parameters
-/build/X86/gem5.opt /configs/example/se.py -c  
/tests/test-progs/chdir-print/chdir-print -n2 --ruby

-
-
-# example successful output for MESI_Three_Level:
-
-<...>
-
- REAL SIMULATION 
-info: Entering event queue @ 0.  Starting simulation...
-warn: Replacement policy updates recently became the responsibility of  
SLICC state machines. Make sure to setMRU() near callbacks in .sm files!
-cwd:  
/proj/research_simu/users/jalsop/gem5-mem_dif_debug/tests/test-progs/chdir-print/

-cwd: /proc
-
-<...>
-
-processor   : 0
-vendor_id   : Generic
-cpu family  : 0
-model   : 0
-model name  : Generic
-stepping: 0
-cpu MHz : 2000
-cache size: : 2048K
-physical id : 0
-siblings: 2
-core id : 0
-cpu cores   : 2
-fpu : yes
-fpu exception   : yes
-cpuid level : 1
-wp  : yes
-flags   : fpu
-cache alignment : 64
-
-processor   : 1
-vendor_id   : Generic
-cpu family  : 0
-model   : 0
-model name  : Generic
-stepping: 0
-cpu MHz : 2000
-cache size: : 2048K
-physical id : 0
-siblings: 2
-core id : 1
-cpu cores   : 2
-fpu : yes
-fpu exception   : yes
-cpuid level : 1
-wp  : yes
-flags   : fpu
-cache alignment : 64
-
-SUCCESS
-Exiting @ tick 2694923000 because exiting with last active thread context
diff --git a/tests/test-progs/chdir-print/chdir-print.c  
b/tests/test-progs/chdir-print/chdir-print.c

deleted file mode 100644
index 71747b6..000
--- a/tests/test-progs/chdir-print/chdir-print.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2011-2015 Advanced Micro Devices, Inc.
- * All rights reserved.
- *
- * For use for simulation and test purposes only
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are  
met:

- *
- * 1. Redistributions of source code must retain the above copyright  
notice,

- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright  
notice,
- * this list of conditions and the following disclaimer in the  
documentation

- * and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the copyright holder nor the names of its
- * contributors may be used to endorse or promote products derived from  
this

- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS  
IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,  
THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR  
PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS  
BE

- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS 

[gem5-dev] Change in gem5/gem5[develop]: tests: move stack-print test to the new framework

2020-03-31 Thread Ciro Santilli (Gerrit)
Ciro Santilli has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27311 )



Change subject: tests: move stack-print test to the new framework
..

tests: move stack-print test to the new framework

Change-Id: Id002bdaa0627a6fd31b577d39f16332841c381cf
---
R tests/test-progs/stack-print.c
D tests/test-progs/stack-print/bin/x86/linux/stack-print
2 files changed, 4 insertions(+), 4 deletions(-)



diff --git a/tests/test-progs/stack-print/src/stack-print.c  
b/tests/test-progs/stack-print.c

similarity index 94%
rename from tests/test-progs/stack-print/src/stack-print.c
rename to tests/test-progs/stack-print.c
index 9fbf962..2df0605 100644
--- a/tests/test-progs/stack-print/src/stack-print.c
+++ b/tests/test-progs/stack-print.c
@@ -40,16 +40,16 @@
 {
 int i;

-printf("%p: argc: [%d]\n", , argc);
+printf("%p: argc: [%d]\n", (void*), argc);
 printf("\n");

 for (i = 0; i < argc; i++)
-printf("%p: argv[%d]: [%s]\n", [i], i, argv[i]);
+printf("%p: argv[%d]: [%s]\n", (void*)[i], i, argv[i]);
 printf("\n");

 i = 0;
 while (envp[i] != NULL) {
-printf("%p: envp[%d]: [%s]\n", [i], i, envp[i]);
+printf("%p: envp[%d]: [%s]\n", (void*)[i], i, envp[i]);
 i++;
 }
 printf("\n");
@@ -159,7 +159,7 @@
 printf("\n");
 return 0;
 }
-printf("%p: %s: [%lx]\n", auxv, type, auxv->a_un.a_val);
+printf("%p: %s: [%lx]\n", (void *)auxv, type, auxv->a_un.a_val);
 }
 }

diff --git a/tests/test-progs/stack-print/bin/x86/linux/stack-print  
b/tests/test-progs/stack-print/bin/x86/linux/stack-print

deleted file mode 100755
index e40dc48..000
--- a/tests/test-progs/stack-print/bin/x86/linux/stack-print
+++ /dev/null
Binary files differ

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27311
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Id002bdaa0627a6fd31b577d39f16332841c381cf
Gerrit-Change-Number: 27311
Gerrit-PatchSet: 1
Gerrit-Owner: Ciro Santilli 
Gerrit-MessageType: newchange
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[develop]: tests: generic Makefile for user and baremetal test programs

2020-03-31 Thread Ciro Santilli (Gerrit)
Ciro Santilli has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27308 )



Change subject: tests: generic Makefile for user and baremetal test programs
..

tests: generic Makefile for user and baremetal test programs

This patch aims to provide a single unified Makefile for tests/test-progs.

This should make it easy to add either user or baremetal test programs
for any ISA.

Another major advantage is the ability to build every single test
program in one go, which makes it much more likely that we will notice
when they break on new compilers.

In this setup, a single source file can be used for both userland and
baremetal. Baremetal tests must be currently very basic however, since
there is no standard library support. However this already covers the
common use case of testing m5ops and ARM semihosting, e.g. m5_exit.c
runs on both userland and baremetal on ARM.

The initial test programs added are hello worlds to test the framework
itself, m5ops and arm semihosting SYS_EXIT.

Change-Id: Ia6ad9e6c53dd9f2eba726ec89ba066ddf5c01680
---
M .gitignore
A tests/test-progs/Makefile
A tests/test-progs/arm64/semihost_exit.S
A tests/test-progs/bootloader/arm64.S
A tests/test-progs/hello.c
A tests/test-progs/hello_cpp.cpp
A tests/test-progs/link.ld
A tests/test-progs/m5_checkpoint.c
A tests/test-progs/m5_exit.c
9 files changed, 455 insertions(+), 0 deletions(-)



diff --git a/.gitignore b/.gitignore
index b851a23..811471e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,5 +28,6 @@
 /system/arm/bootloader/arm64/boot.arm64
 /system/arm/bootloader/arm64/boot_emm.arm64
 /system/arm/bootloader/arm64/boot_v2.arm64
+/tests/test-progs/out
 configs/example/memcheck.cfg
 configs/dram/lowp_sweep.cfg
diff --git a/tests/test-progs/Makefile b/tests/test-progs/Makefile
new file mode 100644
index 000..42da2b1
--- /dev/null
+++ b/tests/test-progs/Makefile
@@ -0,0 +1,203 @@
+# Copyright (c) 2020 ARM Limited
+# All rights reserved.
+#
+# The license below extends only to copyright in the software and shall
+# not be construed as granting a license to any other intellectual
+# property including but not limited to intellectual property relating
+# to a hardware implementation of the functionality of the software
+# licensed hereunder.  You may use the software subject to the license
+# terms below provided that you ensure that this notice is replicated
+# unmodified and in its entirety in all distributions of the software,
+# modified or unmodified, in source code or in binary form.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+define HELP
+Build baremetal and userland C, C++ or assembly executables.
+
+Sample usages:
+
+Build all userland examples for the default ISA (x86):
+
+make
+
+Only programs on the current directory and ISA named subdirectories e.g.
+x86, arm, arm64, riscv are build.
+
+The generated executables are placed under the directory out/
+
+Build all baremetal and userland examples for ARM:
+
+make ISA=arm64 all
+
+Currently supported ISA values: x86, arm, arm64, riscv.
+
+Build only user or only baremetal:
+
+make ISA=x86   user
+make ISA=arm64 bare
+
+x86 currently only supports userland executables.
+endef
+export HELP
+
+# Input files for each build type. We whitelist barmetal ones,
+# and blacklist
+BARE_INS = \
+  m5_exit \
+  m5_checkpoint
+USER_INS = $(basename $(foreach BASE_DIR, . $(ISA), $(foreach IN_EXT, \
+  $(IN_EXT_ASM) $(IN_EXT_C) $(IN_EXT_CXX), $(wildcard