Git Product home page Git Product logo

shamon's Introduction

Shamon

A library and a set of tools for monitoring heterogeneous asynchronous events sources. Events are efficiently transferred via concurrent buffers in the shared memory.

Configuring

# simple configuration
cmake . -DCMAKE_C_COMPILER=clang

# configuration without dynamorio sources
cmake . -DCMAKE_C_COMPILER=clang -DDYNAMORIO_SOURCES=OFF

Note that using clang is not compulsory, but some helper scripts (e.g., sources/tsan/compiler.py) rely on that and there is a risk that these scripts will not work in the release build if the library is not compiled with clang. A work-around, if needed, is turning of interprocedural optimizations (IPO) in cmake (use -DENABLE_IPO=OFF while configuring).

shamon's People

Contributors

mchalupa avatar fabianmuehlboeck avatar smml1996 avatar

Watchers

 avatar  avatar

shamon's Issues

Generate figures for experiments

The scripts that we used to generate experiments are in the paper. We should take them and adjust for the artifact. I'd put them into a folder on a level of shamon (not inside shamon repo, it is polluted with clutter enough).

  • scalability
  • primes
  • primes tessla
  • bank
  • bank tessla
  • dataraces (#11 )

compiler is broken

After the last pushed fix to the compiler, I'm getting this if I try to compile the monitor for data races:

monitor.c: In function ‘RULE_SET_default’:
monitor.c:1759:9: error: ‘count_Program’ undeclared (first use in this function)
 1759 |         count_Program = shm_arbiter_buffer_peek(
      |         ^~~~~~~~~~~~~
monitor.c:1759:9: note: each undeclared identifier is reported only once for each function it appears in
monitor.c:1760:42: error: ‘e1_Program’ undeclared (first use in this function)
 1760 |             BUFFER_Program, 5, (void **)&e1_Program, &i1_Program,
      |                                          ^~~~~~~~~~
monitor.c:1760:55: error: ‘i1_Program’ undeclared (first use in this function)
 1760 |             BUFFER_Program, 5, (void **)&e1_Program, &i1_Program,
      |                                                       ^~~~~~~~~~
monitor.c:1761:23: error: ‘e2_Program’ undeclared (first use in this function)
 1761 |             (void **)&e2_Program, &i2_Program);
      |                       ^~~~~~~~~~
monitor.c:1761:36: error: ‘i2_Program’ undeclared (first use in this function)
 1761 |             (void **)&e2_Program, &i2_Program);
      |                                    ^~~~~~~~~~
monitor.c:1783:8: warning: missing terminating " character
 1783 | printf("***** BUFFER GROUPS *****
      |        ^
monitor.c:1783:8: error: missing terminating " character
 1783 | printf("***** BUFFER GROUPS *****
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
monitor.c:1784:1: warning: missing terminating " character
 1784 | ")
      | ^
monitor.c:1784:1: error: missing terminating " character
 1784 | ")
      | ^~
monitor.c:1785:8: warning: missing terminating " character
 1785 | printf("***** Threads *****
      |        ^
monitor.c:1785:8: error: missing terminating " character
 1785 | printf("***** Threads *****
      |        ^~~~~~~~~~~~~~~~~~~~
monitor.c:1786:1: warning: missing terminating " character
 1786 | ")dll_node *current = BG_Threads.head;
      | ^
monitor.c:1786:1: error: missing terminating " character
 1786 | ")dll_node *current = BG_Threads.head;
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
monitor.c:1787:1: error: expected expression before ‘{’ token
 1787 | {
      | ^
monitor.c:1790:24: warning: character constant too long for its type
 1790 |                 printf('Threads[%d].ARGS{', i);
      |                        ^~~~~~~~~~~~~~~~~~~
monitor.c:1792:24: warning: multi-character character constant [-Wmultichar]
 1792 |                 printf('}\n');
      |                        ^~~~~
monitor.c:1800:24: warning: character constant too long for its type
 1800 |                 printf('Threads[%d].buffer{\n', i);
      |                        ^~~~~~~~~~~~~~~~~~~~~~~
monitor.c:1803:24: warning: multi-character character constant [-Wmultichar]
 1803 |                 printf('}\n');
      |                        ^~~~~
monitor.c:1807:87: error: expected ‘)’ before ‘}’ token
 1807 | }fprintf(stderr, "Seems all rules are waiting for some events that are not coming\n");
      |                                                                                       ^
      |                                                                                       )
 1808 |     }
      |     ~                                                                                  
monitor.c:1783:7: note: to match this ‘(’
 1783 | printf("***** BUFFER GROUPS *****
      |       ^
monitor.c:1807:87: error: expected ‘;’ before ‘}’ token
 1807 | }fprintf(stderr, "Seems all rules are waiting for some events that are not coming\n");
      |                                                                                       ^
      |                                                                                       ;
 1808 |     }
      |     ~                                                                                  
make: *** [Makefile:22: monitor] Error 1

How to reproduce:

cd experiments/dataraces
make

Filter buffer groups while choosing them

Right now, the generated code does this when checking a rule:

update_bg(...)
chosen = bg_get_first_n(..., N)
foreach bg in chosen {
  if (bg matches the 'where' condition) {
    // check rules  
  }
}

That means that we can actually check less than N buffers (even no buffer) event though there can be more than N buffers matching (but they are not among the first N buffers in the current order). The where condition should be checked when getting the first N buffers -- in bg_get_first_n or generate the code instead of calling this function.

Create a docker artifact

Two reasons:

  • DynamoRIO does not work on FASE's VM
  • Running in VM is inefficient, we cannot hope to reproduce the numbers in VM

So to have some artifact that people can actually use, add a docker artifact. It should be easy enough as we have all the pieces.

Bundle packeges that are need for plots

requirements.txt:

contourpy==1.0.5
cycler==0.11.0
fonttools==4.37.3
kiwisolver==1.4.4
matplotlib==3.6.0
numpy==1.23.3
packaging==21.3
pandas==1.5.0
Pillow==9.2.0
pyparsing==3.0.9
python-dateutil==2.8.2
pytz==2022.2.1
seaborn==0.12.0
six==1.16.0

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.