GithubHelp home page GithubHelp logo

pimprof's Introduction

PIMProf

This project is compatible with LLVM 7.0.1 and clang 7

Structure of repository

  • Configs/: The configuration files of PIMProf. The default is defaultconfig_32.ini.
  • LLVMAnalysis/: The tool for instrumenting the program. This is implemented as an LLVM pass and invoked by clang. This directory also contains some hooks that can be used for annotating region of interest.
  • PIMProfSolver/: The Pin tool for analyzing the instrumented program.
  • test/: The unit test.

Prerequisite

  1. Install llvm-7 and clang-7. Using apt will work.
$ apt install clang-7 llvm-7
  1. Download intel pin 3.11 from intel website.
  2. Edit Makefile.config and point the variables to the correct path.

Run

  1. Compile with:
$ make -j
  1. Compile and run the unit test with:
$ make test

Detailed Usage

We use the unit test in test/ as an example:

  1. By default, we generate the LLVM pass as build/LLVMAnalysis/libPIMProfAnnotation.so. Invoke this LLVM pass by adding the following flags when compiling the source file with clang:
$ clang++-7 -Xclang -load -Xclang $(INJECTION_SO) ...
  1. By default, we generate the Pin tool as build/PIMProfSolver/PIMProfSolver.so. Start PIMProf analysis by running the program with this Pin tool:
$ pin -t build/PIMProfSolver/PIMProfSolver.so -c Configs/defaultconfig_32.ini -o decision.out -- ./test.exe

Commonly used command line options:

-c <config filename>
        specify config file name
-o <decision output filename>
        specify file name containing PIM offloading decision
-roi
        specify whether ROI mode is enabled, if enabled, only regions between
        PIMProfROIHead and PIMProfROITail is analyzed
-roidecision
        specify whether ROI decision mode is enabled, if enabled, regions
        between PIMProfROIHead and PIMProfROITail will be offloaded to PIM and
        the rest stay on CPU
-s <statistics output filename>
        specify file name for statistics

The memory trace is output as: test/MemTrace.out.

pimprof's People

Contributors

warsier avatar

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.