Skip to content

pag-iiitd/Hermes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HERMES

There are three steps to running this tool for checking a program for a deadlock.

  1. Instrument the source code.
  2. Compile and profile the instrumented code into an executable.
  3. Execute the profiled code for the output.

The detailed instructions are as follows:

1. Instrument

To compile the clang tool, use cd clangTool && make clangTool

This requires:

  • clang+llvm build files which you can download from here. I have downloaded clang+llvm-3.8.0-x86_64-linux-gnu-debian8.tar.xz. Please change the location of the libraries in Makefile in clangTool folder (this flag: CLANG_BUILD_FLAGS).
  • a file called compile_commands.json which is a compilation database needed for clang tooling. The directory contains a sample compile_commands.json file. You just have to specify the command, fileName, and the directory. Learn how to create such files here.

Change the path to these directories in the Makefile of directory clangTool accordingly.

To produce the instrumented code, run: ./clangTool path-to-the-source/source-file.cpp

This will generate a file called i_source-file.cpp in the same directory where the source resides.

2. Compile and profile

Follow these steps:

  • cd Hermes/
  • make
  • sudo make install
  • cd scheduler

If the make command gives any error regarding libopts.a or solver-src.a being missing, then run make command from these directories, i.e. from libopts and solver (probably after running make clean). Also, make sure to add -lz3 for the LIBS in Makefile of the Hermes and scheduler folders.

This should generate libisp_prof.so in /usr/local/lib/.

To generate the profiled executable, run:

ispcxx -o executable executable.cpp ../clangTool/GenerateAssumes.cpp ../clangTool/IfInfo.cpp ../profiler/Client.c

3. Execute

Run the executable through the tool isp with this command: ./isp.exe -n no-of-processes ./executable

You can find all the options isp provides using ./isp.exe -help

About

FM'18 work

Resources

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
license.rtf

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published