Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New instrumentation workflow proposal #6

Open
5 tasks
intersimone999 opened this issue Sep 12, 2017 · 1 comment
Open
5 tasks

New instrumentation workflow proposal #6

intersimone999 opened this issue Sep 12, 2017 · 1 comment

Comments

@intersimone999
Copy link
Collaborator

intersimone999 commented Sep 12, 2017

At the moment, we just instrument and compile a single function/file at a time. Actually, as far as I know, most of the state-of-the-art tools do not go much further than this (see Austin and CAVM). Therefore, making it work in the context of a whole system could be hard. We could adapt our current instrumentation workflow to make OCELOT work also with functions that call other functions, but it would require building the entire project every time we change the function we want to test, and it may take hours for big projects. Anyway, I would like to propose a slightly different instrumentation workflow that would not require a full build of the project each time we change function.

For a project P:

  • Instrument all the project. With this step, we instrument all the functions. We add a parameter to the tracing functions, _function_id, and every function is instrumented so that it calls the tracing function with its own id. The tracking function is aware of the function that is calling it. We just need to filter all the calls from the function that we want to test, using its id, to generate test cases for it.
  • Modify the project Makefile. We need to make sure that the output of the build is a ".so" library, rather than an executable file. To do this, we have to check and, if necessary, modify the makefile of the project.
  • Build the whole project. This is straightforward, we just need to call "make".

For each function F to test:

  • Modify and build the JNI module. This step is necessary to (i) link the project ".so" file to the JNI module and (ii) to setup the module for the function
  • Run test case generation.

tl;dr: OCELOT should work in three steps:

java -jar ocelot.jar --instrument projects/gimp
java -jar ocelot.jar --configure --target projects/gimp/gimp.so -Dtarget_function=gimp_color_gradient -Darrays_max_size=100 [...]
java -jar ocelot.jar --run
@intersimone999
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant