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

Latest master changes to baremetal #213

Merged
merged 57 commits into from
Sep 4, 2023

Conversation

PurplePachyderm
Copy link
Member

For now, baremetal will probably be kept as a separate/optional feature branch

PurplePachyderm and others added 30 commits May 16, 2023 17:01
- This way, multi-codelet capture becomes possible
- In order to register memory state from before capture, we save the
protected mem zones and permissions. This is only dune during the initial
protection phase, should we intercept mallocs & frees too ?
- dump_init is still the default and is uesd for single codelet capture
- multi_dump_init can be used as an alternative for multi codelet
capture => when used, the tracee will continue executing after a codelet
and the trace rwill free its memory before terminating itself
- dump_init() / multi_dump_init() should still be called at the very
  beginning of the tracee.
- Codelets should be placed between dump() and after_dump() calls. This
  will now automatically create a new tracer / tracee pair to prepare
  for  the next codelet
- A call to dump_close() should be placed at the end of the tracee.
The tracee now behaves "normally" in single capture.

In multi capture, it will trigger mem lock for the new tracer everytime, and avoid
exiting after non captured inocations.
TODO :
- Modify the dump function to accept multiple invocations to dump.
Currently, we insert N calls that eah start capture for a single invocation,
which is "slightly" incorrect.
- Do the same for the OpenMP dump pass
Variable was only used from tracer application.
Now it is also used in the Python scripts so these can be
run from anywhere.
    Variable was only used from tracer application.
    Now it is also used in the Python scripts so these can be
    run from anywhere.
Variable was only used from tracer application.
Now it is also used in the Python scripts so these can be
run from anywhere.
Graph generation etc... still seem to have issue, but report generation
does run
These changes should make it easier to propagate the CERE_MODE command
in complex build systems. Is should now be accessible by using
$CERE_MODE, which was not available previously as the variable's
definition was inlined in the command
These are optional variables that will default to CERE_WORKING_PATH when
undefined.
- CERE_BUILD_PATH will be used as the current dir to launch build
  commands
- CERE_RUN_PATH will be used as the current dir to launch run commands
PurplePachyderm and others added 27 commits August 16, 2023 13:39
Env variable changes to multi codelet branch
"dump" function now accepts a more simple string of invocations.
It is parsed at runtime. While this needs to be doen for every dump call
(even those not corresponding to an invocation to dump), this makes the
LLVM pass simpler for now.
New feature that allows to specify and capture multiple regions/invocations at once.
- Modified the tracer / tracee interactions -> at the end of a region, we can now spawn a new tracee, on tracee becomes tracer, with memory unlocking system
- Modified LLVM passes to insert "dump"  and "after_dump" calls around multiple regions
- Updated the cere capture script to parse / check a list of invocs passed as CLI argument
We now have cerec for C, cerec++ for C++ and ceref for Fortran (optional).
Source language detection caused issues at link time in the past, especially when
linking C++ : for instance, the C++ standard lib would not always be found because
clang would be called called instead of clang++.

Now, choosing the right compiler is the task of the target application's build system,
instead of CERE's automatic language detection.
This could cause issues, for instance when CMake was trying to write .ll files to write protected directories when building test programs
@PurplePachyderm PurplePachyderm merged commit 91ccbf9 into baremetal-replay Sep 4, 2023
1 check failed
@PurplePachyderm PurplePachyderm deleted the baremtal-master-merge branch September 4, 2023 09:59
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

Successfully merging this pull request may close these issues.

1 participant