[gem5-dev] Change in gem5/gem5[release-staging-v20.1.0.0]: cpu: Allow storing an invalid HTM checkpoint

2020-09-23 Thread Giacomo Travaglini (Gerrit) via gem5-dev

Hello Timothy Hayes,

I'd like you to do a code review. Please visit

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

to review the following change.


Change subject: cpu: Allow storing an invalid HTM checkpoint
..

cpu: Allow storing an invalid HTM checkpoint

Commits 02745afd and f9b4e32 introduced a mechanism for creating checkpoint
objects for hardware transactional memory (HTM) and Arm TME. Because the
checkpoint object also contains the local UID of a transaction, it is
needed before any architectural checkpointing takes places. This caused
segfaults when running HTM codes.

This commit allows ISAs to allocate a checkpoint once at the beginning
of simulation.  In order to do that we need to remove the validity check
assertion; the cpt will become valid only after a first successfull
transaction start

Change-Id: I233d01805f8ab655131ed8cd6404950a2bf6fbc7
---
M src/cpu/o3/thread_context_impl.hh
M src/cpu/simple_thread.cc
2 files changed, 0 insertions(+), 2 deletions(-)



diff --git a/src/cpu/o3/thread_context_impl.hh  
b/src/cpu/o3/thread_context_impl.hh

index 005aa57..bea4dc7 100644
--- a/src/cpu/o3/thread_context_impl.hh
+++ b/src/cpu/o3/thread_context_impl.hh
@@ -347,7 +347,6 @@
 void
 O3ThreadContext::setHtmCheckpointPtr(BaseHTMCheckpointPtr new_cpt)
 {
-assert(!thread->htmCheckpoint->valid());
 thread->htmCheckpoint = std::move(new_cpt);
 }

diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc
index 28a1c80..b9b69d8 100644
--- a/src/cpu/simple_thread.cc
+++ b/src/cpu/simple_thread.cc
@@ -196,6 +196,5 @@
 void
 SimpleThread::setHtmCheckpointPtr(BaseHTMCheckpointPtr new_cpt)
 {
-assert(!_htmCheckpoint->valid());
 _htmCheckpoint = std::move(new_cpt);
 }

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


Gerrit-Project: public/gem5
Gerrit-Branch: release-staging-v20.1.0.0
Gerrit-Change-Id: I233d01805f8ab655131ed8cd6404950a2bf6fbc7
Gerrit-Change-Number: 35015
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini 
Gerrit-Reviewer: Timothy Hayes 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: cpu: Use cprintf and C++ type magic to get rid of a THE_ISA.

2020-09-23 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/34822 )


Change subject: cpu: Use cprintf and C++ type magic to get rid of a THE_ISA.
..

cpu: Use cprintf and C++ type magic to get rid of a THE_ISA.

It should be fine to let operator overloading take care of figuring out
how to print the ExtMachInst type for a given ISA.

Change-Id: I173fd9f49013d92191118775d20344219a69337e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34822
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Giacomo Travaglini 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/cpu/minor/dyn_inst.cc
1 file changed, 1 insertion(+), 4 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, but someone else must approve
  Giacomo Travaglini: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/cpu/minor/dyn_inst.cc b/src/cpu/minor/dyn_inst.cc
index af02d9f..1b43fc8 100644
--- a/src/cpu/minor/dyn_inst.cc
+++ b/src/cpu/minor/dyn_inst.cc
@@ -214,10 +214,7 @@
 regs_str << ',';
 }

-#if THE_ISA == ARM_ISA
-regs_str << " extMachInst=" << std::hex << std::setw(16)
-<< std::setfill('0') << staticInst->machInst << std::dec;
-#endif
+ccprintf(regs_str, " extMachInst=%160x", staticInst->machInst);
 }

 std::ostringstream flags;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/34822
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: I173fd9f49013d92191118775d20344219a69337e
Gerrit-Change-Number: 34822
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[release-staging-v20.1.0.0]: arch-arm: Instantiate a single HTM checkpoint at ISA::startup

2020-09-23 Thread Giacomo Travaglini (Gerrit) via gem5-dev

Hello Timothy Hayes,

I'd like you to do a code review. Please visit

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

to review the following change.


Change subject: arch-arm: Instantiate a single HTM checkpoint at  
ISA::startup

..

arch-arm: Instantiate a single HTM checkpoint at ISA::startup

Change-Id: I48cc71dce607233f025387379507bcd485943dde
---
M src/arch/arm/insts/tme64ruby.cc
M src/arch/arm/isa.cc
2 files changed, 15 insertions(+), 7 deletions(-)



diff --git a/src/arch/arm/insts/tme64ruby.cc  
b/src/arch/arm/insts/tme64ruby.cc

index 99481ba..f8d9481 100644
--- a/src/arch/arm/insts/tme64ruby.cc
+++ b/src/arch/arm/insts/tme64ruby.cc
@@ -109,15 +109,16 @@

 // checkpointing occurs in the outer transaction only
 if (htm_depth == 1) {
-auto new_cpt = new HTMCheckpoint();
+BaseHTMCheckpointPtr& cpt =  
xc->tcBase()->getHtmCheckpointPtr();


-new_cpt->save(tc);
-new_cpt->destinationRegister(dest);
+HTMCheckpoint *armcpt =
+dynamic_cast(cpt.get());
+assert(armcpt != nullptr);
+
+armcpt->save(tc);
+armcpt->destinationRegister(dest);

 ArmISA::globalClearExclusive(tc);
-
-xc->tcBase()->setHtmCheckpointPtr(
-std::unique_ptr(new_cpt));
 }

 xc->setIntRegOperand(this, 0, (Dest64) & mask(intWidth));
diff --git a/src/arch/arm/isa.cc b/src/arch/arm/isa.cc
index 9ace236..4ad1125 100644
--- a/src/arch/arm/isa.cc
+++ b/src/arch/arm/isa.cc
@@ -38,6 +38,7 @@
 #include "arch/arm/isa.hh"

 #include "arch/arm/faults.hh"
+#include "arch/arm/htm.hh"
 #include "arch/arm/interrupts.hh"
 #include "arch/arm/pmu.hh"
 #include "arch/arm/self_debug.hh"
@@ -439,9 +440,15 @@
 {
 BaseISA::startup();

-if (tc)
+if (tc) {
 setupThreadContext();

+if (haveTME) {
+std::unique_ptr cpt(new HTMCheckpoint());
+tc->setHtmCheckpointPtr(std::move(cpt));
+}
+}
+
 afterStartup = true;
 }


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


Gerrit-Project: public/gem5
Gerrit-Branch: release-staging-v20.1.0.0
Gerrit-Change-Id: I48cc71dce607233f025387379507bcd485943dde
Gerrit-Change-Number: 35016
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini 
Gerrit-Reviewer: Timothy Hayes 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: gpu-compute: set exec_mask for permute,bpermute instructions

2020-09-23 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/35036 )



Change subject: gpu-compute: set exec_mask for permute,bpermute instructions
..

gpu-compute: set exec_mask for permute,bpermute instructions

This change sets gpuDynInst->exec_mask for permute and bpermute
instructions, fixing a bug where they would never write their data.

permute and bpermute instructions are load instructions that write
to a VGPR. Because of that, they use gpuDynInst->exec_mask when
checking what lanes should write to the VGPR.

gpuDynInst->exec_mask gets set to wf->execMask() as that is what other
load instructions that write to VGPRs do.

Change-Id: Ie443283488cbd2ab9c17fc255e7cc44418353419
---
M src/arch/gcn3/insts/instructions.cc
1 file changed, 2 insertions(+), 0 deletions(-)



diff --git a/src/arch/gcn3/insts/instructions.cc  
b/src/arch/gcn3/insts/instructions.cc

index 296dbad..b501167 100644
--- a/src/arch/gcn3/insts/instructions.cc
+++ b/src/arch/gcn3/insts/instructions.cc
@@ -32522,6 +32522,7 @@
 {
 Wavefront *wf = gpuDynInst->wavefront();
 gpuDynInst->execUnitId = wf->execUnitId;
+gpuDynInst->exec_mask = wf->execMask();
 gpuDynInst->latency.init(gpuDynInst->computeUnit());
 gpuDynInst->latency.set(gpuDynInst->computeUnit()
 ->cyclesToTicks(Cycles(24)));
@@ -32593,6 +32594,7 @@
 {
 Wavefront *wf = gpuDynInst->wavefront();
 gpuDynInst->execUnitId = wf->execUnitId;
+gpuDynInst->exec_mask = wf->execMask();
 gpuDynInst->latency.init(gpuDynInst->computeUnit());
 gpuDynInst->latency.set(gpuDynInst->computeUnit()
 ->cyclesToTicks(Cycles(24)));

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/35036
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: Ie443283488cbd2ab9c17fc255e7cc44418353419
Gerrit-Change-Number: 35036
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Jenkins build is back to normal : Nightly #76

2020-09-23 Thread jenkins-no-reply--- via gem5-dev
See 
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s


[gem5-dev] Change in gem5/gem5[develop]: scons: Adjust the version of C++ to C++14.

2020-09-23 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/34820 )


Change subject: scons: Adjust the version of C++ to C++14.
..

scons: Adjust the version of C++ to C++14.

Change-Id: I318d337fc61bca0ae40413c23ee36d59d45a79bc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34820
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Daniel Carvalho 
Reviewed-by: Andreas Sandberg 
Reviewed-by: Richard Cooper 
Reviewed-by: Bobby R. Bruce 
Reviewed-by: Giacomo Travaglini 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M SConstruct
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, but someone else must approve; Looks  
good to me, approved

  Andreas Sandberg: Looks good to me, but someone else must approve
  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, but someone else must approve
  Richard Cooper: Looks good to me, but someone else must approve
  kokoro: Regressions pass



diff --git a/SConstruct b/SConstruct
index 0e49df4..ebb59f6 100755
--- a/SConstruct
+++ b/SConstruct
@@ -317,8 +317,8 @@
 # we consistently violate
 main.Append(CCFLAGS=['-Wall', '-Wundef', '-Wextra',
  '-Wno-sign-compare', '-Wno-unused-parameter'])
-# We always compile using C++11
-main.Append(CXXFLAGS=['-std=c++11'])
+# We always compile using C++14
+main.Append(CXXFLAGS=['-std=c++14'])
 if sys.platform.startswith('freebsd'):
 main.Append(CCFLAGS=['-I/usr/local/include'])
 main.Append(CXXFLAGS=['-I/usr/local/include'])

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/34820
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: I318d337fc61bca0ae40413c23ee36d59d45a79bc
Gerrit-Change-Number: 34820
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Anthony Gutierrez 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Ciro Santilli 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: Richard Cooper 
Gerrit-Reviewer: Ryan Gambord 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s