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

Fixes for alice/v6-30-01 #22

Merged
merged 2 commits into from
May 24, 2024
Merged

Conversation

sawenzel
Copy link
Collaborator

sawenzel added 2 commits May 24, 2024 16:20
This commit provides the possibility to pass system library search
paths as well as some compiler include paths to ROOT as environment
variables.
This has the advantage that ROOT will spawn less sub-processes
and we can do the setup only once, instead of doing it for every
single executable that is linked to ROOT.

The commit does not change any default behaviour! Rather, expert-users may use
the new feature by moving the initialization of the search paths to say
software environment loading.

In ALICE, we do something like

```
export ROOT_LDSYSPATH=$(LD_DEBUG=libs LD_PRELOAD=DOESNOTEXIST ls /tmp/DOESNOTEXIST 2>&1 | grep -m 1 "system search path" | sed 's/.*=//g' | awk '//{print $1}')

export ROOT_CPPSYSINCL=$(LC_ALL=C c++ -xc++ -E -v /dev/null 2>&1 | sed -n '/^.include/,${/^ \/.*++/{p}}' | tr '\n' ':' | tr ' ' ':')
```

speeding up the initialization of our executables at runtime and doing
less syscalls that create short-lived processes, for instance calling the compiler.

The effect from this operation can be seen by counting the `execve` syscalls
in a small example:

```
strace -e execve -f root.exe -q -e "double x=1;"  # ---> 14 calls

export ROOT_LDSYSPATH=...
export ROOT_CPPSYSINCL=...
strace -e execve -f root.exe -q -e "double x=1;"  # ---> 6 calls
```

This gain can accumulate to significant savings when used in a multi-process environment
such as ALICE is using.
…o ExecPlugin when type matching can be guaranteed"

This reverts commit a1ea2d8.
This fixes a performance problem described here: https://its.cern.ch/jira/browse/O2-4652
@sawenzel sawenzel merged commit d511ab4 into alisw:alice/v6-30-01 May 24, 2024
1 of 13 checks passed
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