summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGregory L. Lee <lee218@llnl.gov>2016-08-08 16:02:33 -0700
committerGregory L. Lee <lee218@llnl.gov>2016-08-15 13:51:53 -0700
commit69931996bf88a74fb256ee778691ec775963e904 (patch)
tree0e9f195dd0e4fe9e72a843ddf32b1efa647247ba /var
parentf9cb21e8868ebf7555c715e353a5ec6bec4aad39 (diff)
downloadspack-69931996bf88a74fb256ee778691ec775963e904.tar.gz
spack-69931996bf88a74fb256ee778691ec775963e904.tar.bz2
spack-69931996bf88a74fb256ee778691ec775963e904.tar.xz
spack-69931996bf88a74fb256ee778691ec775963e904.zip
added dyninst patches for stat+dysect
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/dyninst/package.py6
-rw-r--r--var/spack/repos/builtin/packages/dyninst/stackanalysis_h.patch11
-rw-r--r--var/spack/repos/builtin/packages/dyninst/stat_dysect.patch96
-rw-r--r--var/spack/repos/builtin/packages/stat/package.py7
4 files changed, 117 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py
index 55c319165f..3df7ca551d 100644
--- a/var/spack/repos/builtin/packages/dyninst/package.py
+++ b/var/spack/repos/builtin/packages/dyninst/package.py
@@ -44,11 +44,17 @@ class Dyninst(Package):
version('8.1.1', 'd1a04e995b7aa70960cd1d1fac8bd6ac',
url="http://www.paradyn.org/release8.1/DyninstAPI-8.1.1.tgz")
+ variant('stat_dysect', default=False,
+ description="patch for STAT's DySectAPI")
+
depends_on("libelf")
depends_on("libdwarf")
depends_on("boost@1.42:")
depends_on('cmake', type='build')
+ patch('stat_dysect.patch', when='+stat_dysect')
+ patch('stackanalysis_h.patch', when='@9.2.0')
+
# new version uses cmake
def install(self, spec, prefix):
if spec.satisfies('@:8.1'):
diff --git a/var/spack/repos/builtin/packages/dyninst/stackanalysis_h.patch b/var/spack/repos/builtin/packages/dyninst/stackanalysis_h.patch
new file mode 100644
index 0000000000..2c04d935d9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dyninst/stackanalysis_h.patch
@@ -0,0 +1,11 @@
+--- a/dataflowAPI/h/stackanalysis.h 2016-06-29 14:54:14.000000000 -0700
++++ b/dataflowAPI/h/stackanalysis.h 2016-08-02 09:50:13.619079000 -0700
+@@ -331,7 +331,7 @@
+
+ // To build intervals, we must replay the effect of each instruction.
+ // To avoid sucking enormous time, we keep those transfer functions around...
+- typedef std::map<ParseAPI::Block *, std::map<Offset, TransferFuncs>>
++ typedef std::map<ParseAPI::Block *, std::map<Offset, TransferFuncs> >
+ InstructionEffects;
+
+ DATAFLOW_EXPORT StackAnalysis();
diff --git a/var/spack/repos/builtin/packages/dyninst/stat_dysect.patch b/var/spack/repos/builtin/packages/dyninst/stat_dysect.patch
new file mode 100644
index 0000000000..c15403683f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dyninst/stat_dysect.patch
@@ -0,0 +1,96 @@
+From 3aebb41ce0ea5b578a1ebf6810446c660066c525 Mon Sep 17 00:00:00 2001
+From: Jesper Puge Nielsen <nielsen34@llnl.gov>
+Date: Wed, 12 Aug 2015 21:07:52 -0700
+Subject: [PATCH] =?UTF-8?q?Exposed=20stackwalker=20and=20proc=20callback=20status=20to=20DySect
+=20=C3c?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+---
+ dyninstAPI/h/BPatch_process.h | 13 +++++++++++++
+ dyninstAPI/src/BPatch_process.C | 18 ++++++++++++++++++
+ dyninstAPI/src/dynProcess.h | 3 ++-
+ 3 files changed, 33 insertions(+), 1 deletions(-)
+
+diff --git a/dyninstAPI/h/BPatch_process.h b/dyninstAPI/h/BPatch_process.h
+index 5e01bbb..1316bb2 100644
+--- a/dyninstAPI/h/BPatch_process.h
++++ b/dyninstAPI/h/BPatch_process.h
+@@ -225,6 +225,10 @@ class BPATCH_DLL_EXPORT BPatch_process : public BPatch_addressSpace {
+ //
+ // this function should go away as soon as Paradyn links against Dyninst
+ PCProcess *lowlevel_process() const { return llproc; }
++
++ // Expose walker from Dyninst proces
++ void *get_walker() const;
++
+ // These internal funcs trigger callbacks registered to matching events
+ bool triggerStopThread(instPoint *intPoint, func_instance *intFunc,
+ int cb_ID, void *retVal);
+@@ -281,6 +285,15 @@ class BPATCH_DLL_EXPORT BPatch_process : public BPatch_addressSpace {
+
+ bool continueExecution();
+
++ // BPatch_process::keepStopped
++ //
++ // Changes the desired process stat to prevent
++ // Dyninst from resuming the process after
++ // handling the current event.
++ // Must be called from an event handler.
++
++ void keepStopped();
++
+ // BPatch_process::terminateExecution
+ //
+ // Terminate mutatee process
+diff --git a/dyninstAPI/src/BPatch_process.C b/dyninstAPI/src/BPatch_process.C
+index 115f215..809e797 100644
+--- a/dyninstAPI/src/BPatch_process.C
++++ b/dyninstAPI/src/BPatch_process.C
+@@ -507,6 +507,19 @@ bool BPatch_process::continueExecution()
+ }
+
+ /*
++ * BPatch_process::keepStopped
++ *
++ * Changes the desired process stat to prevent
++ * Dyninst from resuming the process after
++ * handling the current event.
++ * Must be called from an event handler.
++ */
++void BPatch_process::keepStopped()
++{
++ llproc->setDesiredProcessState(PCProcess::ps_stopped);
++}
++
++/*
+ * BPatch_process::terminateExecution
+ *
+ * Kill the thread.
+@@ -1754,3 +1767,8 @@ bool BPatch_process::protectAnalyzedCode()
+ }
+ return ret;
+ }
++
++void *BPatch_process::get_walker() const
++{
++ return llproc->get_walker();
++}
+diff --git a/dyninstAPI/src/dynProcess.h b/dyninstAPI/src/dynProcess.h
+index 54b0c6e..00721d1 100644
+--- a/dyninstAPI/src/dynProcess.h
++++ b/dyninstAPI/src/dynProcess.h
+@@ -302,7 +302,8 @@ public:
+ // Stackwalking internals
+ bool walkStack(pdvector<Frame> &stackWalk, PCThread *thread);
+ bool getActiveFrame(Frame &frame, PCThread *thread);
+-
++ Dyninst::Stackwalker::Walker *get_walker() { return stackwalker_; }
++
+ void addSignalHandler(Address, unsigned);
+ bool isInSignalHandler(Address addr);
+
+--
+1.7.1
+
diff --git a/var/spack/repos/builtin/packages/stat/package.py b/var/spack/repos/builtin/packages/stat/package.py
index 859f570266..7c54f22251 100644
--- a/var/spack/repos/builtin/packages/stat/package.py
+++ b/var/spack/repos/builtin/packages/stat/package.py
@@ -34,8 +34,8 @@ class Stat(Package):
version('2.2.0', '26bd69dd57a15afdd5d0ebdb0b7fb6fc')
version('2.1.0', 'ece26beaf057aa9134d62adcdda1ba91')
version('2.0.0', 'c7494210b0ba26b577171b92838e1a9b')
- version('3.0.0b', '31df1c2e56ce6ab2a0fe963cd47b769a',
- url='https://github.com/LLNL/STAT/files/382650/STAT-3.0.0b.tar.gz')
+ version('3.0.0b', '4977afd3de2d444a5e1b1fc3b26a38c6',
+ url='https://github.com/LLNL/STAT/files/397809/STAT-3.0.0b.tar.gz')
# TODO: dysect requires Dyninst patch for version 3.0.0b
variant('dysect', default=False, description="enable DySectAPI")
@@ -46,7 +46,8 @@ class Stat(Package):
depends_on('libtool', type='build')
depends_on('libelf')
depends_on('libdwarf')
- depends_on('dyninst')
+ depends_on('dyninst', when='~dysect')
+ depends_on('dyninst@8.2.1+stat_dysect', when='+dysect')
depends_on('graphlib@2.0.0', when='@2.0.0:2.2.0')
depends_on('graphlib@3.0.0', when='@3:')
depends_on('graphviz', type=alldeps)