GithubHelp home page GithubHelp logo

mitos's Introduction

Mitos

Mitos is a library and a tool for collecting sampled memory performance data to view with MemAxes


Quick Start

Requirements

Mitos requires:

  • A Linux kernel with perf_events support for memory sampling. This originated in the 3.10 Linux kernel, but is backported to some versions of RHEL6.6.

  • Dyninst version 8.2 or higher.

  • hwloc

Building

  1. Make sure that Dyninst is installed and its location is added to the CMAKE_PREFIX_PATH environment variable.

  2. Run the following commands from the root of the MemAxes source:

    mkdir build && cd build
    cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/location ..
    make
    make install
    

Running

  1. Find the mitosrun command in the bin directory in the install directory.

  2. Run any binary with mitosrun like this to generate a folder of mitos output data. For example:

    mitosrun ./examples/matmul
    

    The above command will run the matmul example and create a folder called mitos_###, where ### is the number of seconds since the epoch. The folder will contain:

    mitos_###/
       data/
          samples.csv
       src/
          <empty>
       hardware.xml
    

    Where samples.csv contains a comma-separated list of memory samples, hardware.xml describes the hardware topology (using hwloc) and src is an empty directory where you can put the program source files for use in MemAxes.

    mitosrun can also be fine-tuned with the following parameters:

    [options]:
        -b sample buffer size (default 4096)
        -p sample period (default 4000)
        -t sample latency threshold (default 10)
    

Authors

Mitos and MemAxes were originally written by Alfredo Gimenez.

Thanks to Todd Gamblin for suggestions and for giving Mitos a proper build setup.

License

Mitos is distributed under the Apache-2.0 license with the LLVM exception. All new contributions must be made under this license. Copyrights and patents in the Mitos project are retained by contributors. No copyright assignment is required to contribute to Mitos.

See LICENSE and NOTICE for details.

SPDX-License-Identifier: (Apache-2.0 WITH LLVM-exception)

LLNL-CODE-838491

mitos's People

Contributors

aagimene avatar alfredo-gimenez avatar ianlee1521 avatar tgamblin avatar

Stargazers

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

Watchers

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

mitos's Issues

How can I find the mitosrun command?

Find the mitosrun command in the bin directory in the install directory.
But I don't know where the bin directory is.
Please help me! Thanks!

perf_event_open: Invalid argument

Hello,

I'm trying to run Mitos on an Intel machine, I manage to install both Dyninst
and Mitos but when I run a command with Mitos I got the following output:

mitosrun ./examples/matmul 
perf_event_open: Invalid argument
Not ready to begin sampling!
6.47073e+07
Segmentation fault

Obviously matmul does not segfault without mitos.

I've run mitos under strace to identify the faulty arguments:

strace mitosrun ./examples/matmul 2>&1 | grep perf_event
read(6, "8:perf_event:/\n7:blkio:/\n6:net_c"..., 1024) = 138
perf_event_open(0x7f51d322d148, 3613, -1, -1, 0) = -1 EINVAL (Invalid argument)
write(2, "perf_event_open: Invalid argumen"..., 34perf_event_open: Invalid argument

But according to the documentation this seems to be right ...
I've also tryed to put the pid argument at -1 and to add the
PERF_FLAG_FD_NO_GROUP without any results ...

Any idea on what can be wrong ?

I'm running debian jessie with a linux kernel 3.16.0-4-amd64 on an Intel
xeon E5520 8 cores processor.

Thanks,
David

Automated hardware architecture detection in procsmpl.cpp (feature request)

The performance event hardware counter codes used in src/procsmpl.cpp are specific to the Sandy Bridge generation of Intel processors. This results in an error being printed when examples/api_test is run (in addition to the performance event data being presumably lost) on a Westmere machine:

$ ./examples/api_test
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
perf_event_open: Invalid argument
0

These hardware counter encodings can be found on any architecture using a tool like perfmon2. Automated hardware architecture detection is desired in Mitos in order to allow it to be used out-of-the-box on architectures other than Sandy Bridge.

An error occurred while compiling Mitos

Hello!
I tried to compile Mitos on ubuntu16.04, but after make, I reported the following _error:

/ Mitos / build $ make
[7%] Building CXX object src / CMakeFiles / mitos.dir / mitosoutput.cpp.o
In file included from /usr/local/include/LineInformation.h:35:0,
                 from /home/lzc/A/Mitos/src/mitosoutput.cpp:9:
/usr/local/include/RangeLookup.h:55:49: error: expected ')' before '<' token
              AddressRange (Dyninst :: SimpleInterval <T> i) {

This error looks like a Dyninst error. The version of Dyninst I installed is 9.3.2, and in the process of installing Dyninst-9.3.2 there is no error, everything is normal.

I repeat the installation compiled many times, but still reported this error. How to solve this problem?

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.