Giter Club home page Giter Club logo

examples's Introduction

Dyninst

Notes

  • Known issues should have open issues associated with them.
  • ARMv8 (64 bit) support for dynamic instrumentation is experimental and incomplete. For more details about current supported functionality refer to Dyninst Support for the ARMv8 (64 bit).

Build DyninstAPI and its subcomponents

Docker Containers

Containers are provided that can be used for Dyninst development (e.g., make changes to Dyninst and quickly rebuild it) or for development of your own tools (e.g., have a container ready to go with Dyninst). Links will be added here when the containers are pushed to the Dyninst associated package registries. Instructions for usage and building locally are provided in the docker directory.

Install with Spack

spack install dyninst

Build from source

  1. Configure Dyninst with CMake

    cmake /path/to/dyninst/source -DCMAKE_INSTALL_PREFIX=/path/to/installation

  2. Build and install Dyninst in parallel

    make install -jN

If this does not work for you, please refer to the Wiki for detailed instructions. If you encounter any errors, see the Building Dyninst or leave a GitHub issue.

Known Issues

  • Windows 64-bit mode is not yet supported

  • Windows rewriter mode is not yet supported

  • Exceptions in relocated code will not be caught

  • Linux rewriter mode for 32-bit, statically linked binaries does not support binaries with .plt, .rel, or .rela sections.

  • Callbacks at thread or process exit that stop the process will deadlock when a SIGSEGV occurs on a thread other than the main thread of a process

  • Stackwalker is fragile on Windows

  • Parsing a binary with no functions (typically a single object file) will crash at CodeObject destruction time.

examples's People

Contributors

hainest avatar kiwichicken avatar wcohen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

examples's Issues

Not able to build CodeCoverage tool

Hi,
I am following the instructions given in the README of examples repo. I am trying to build codecoverage example.
I used the following command:

$cmake . -DDYNINST_DIR=/tools/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/dyninst-11.0.1-4s4ejzjbibw4vzclube2rxrvusnauuvf/lib/cmake/Dyninst
-- The CXX compiler identification is GNU 7.5.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sanjay/tools/dyninst-examples/codeCoverage

After that I use make command to build, but got the following error. I have set env DYNINST_INCLUDE to point to /tools/spack/opt/spack/linux-ubuntu18.04-skylake/gcc-7.5.0/dyninst-11.0.1-4s4ejzjbibw4vzclube2rxrvusnauuvf/include.

$ make 
[ 12%] Building CXX object CMakeFiles/code_coverage.dir/code_coverage.C.o
/tools/dyninst-examples/codeCoverage/code_coverage.C:25:10: fatal error: BPatch.h: No such file or directory
 #include "BPatch.h"
          ^~~~~~~~~~
compilation terminated.
CMakeFiles/code_coverage.dir/build.make:75: recipe for target 'CMakeFiles/code_coverage.dir/code_coverage.C.o' failed
make[2]: *** [CMakeFiles/code_coverage.dir/code_coverage.C.o] Error 1
CMakeFiles/Makefile2:89: recipe for target 'CMakeFiles/code_coverage.dir/all' failed
make[1]: *** [CMakeFiles/code_coverage.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2

Any suggest to debug the issue is appreciated. Note: I am new to Dyninst.

PS: I think I understood the problem. I used spack to install dyninst, which in turn installed the dependencies separately, including boost, tbb etc. As a result, build is failing. So, time to explore spack first!

libtbbmalloc is not linked

When $LD_LIBRARY_PATH is not set,
libtbbmalloc is not linked with the examples binaries,
even though libtbb and libtbbmalloc_proxy are.

`
ldd maxMalloc | grep tbb

    libtbb.so.2 => /p/paradyn/development/wuxx1279/release/lib/libtbb.so.2 (0x00007f8925ca2000)

libtbbmalloc_proxy.so.2 => /p/paradyn/development/wuxx1279/release/lib/libtbbmalloc_proxy.so.2 (0x00007f8925a9f000)

libtbbmalloc.so.2 => not found

`

I tried to link load TBB_LIBRARIES using load_cache and use target_link_libraries against them, but the problem persists.

Examples does not configure correctly when a dyninst is specified on the command line.

If a Dyninst_DIR is specified to cmake, that should be the only dyninst used
by the examples build. If that dyninst is missing, or otherwise not found, cmake
should abort.

Instead what happens is the examples cmake config will silently find a "random"
version of dyninst installed elsewhere on the system.

The current failure mode is that you will receive a "random" version of dyninst,
instead of the dyninst the examples needs to be built against.

codeCoverage example has dubious performance

Per email from AT (former UMD student, works on PEBIL now), codeCoverage is notably slower than DynamoRIO's coverage tool. Having examined the code, I can say why: function calls are evil in a coverage tool and should only occur at startup/shutdown. It would be much more performant to ensure the mapping of block ID to human-readable data occurs at instrumentation time, and thereby each block simply needs to increment an array element.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.