Tags: alisw/root
Tags
Option to reduce startup syscalls via environment caching 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.
[math] Use correct type when invoking the GSLIntegrator plugin, otherwise heavy checks in the PluginHandler take place that perform interpreter lookups. Fixes root-project#15579
Option to reduce startup syscalls via environment caching 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.
Revert "reduce the use of locks in TPluginHandler and add fast path t… …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
Readjust the representation of CallFunc arguments to match the callee… … signature. TClingCallFunc provides an interface between compiled and interpreted code. That is, we can create at compile time a function to be called by the interpreter and get back its result into compiled code. To do that we require connecting to a function declaration available in the interpreter and calling it by setting input arguments. However, the input arguments are set with the SetArg which can resolve to a type and argument representation different from the signature of the interpreter function we will call. This is practically not a problem integral types because their representation is mostly the same. The problem becomes visible when we call SetArg with a `double` and the function signature expects a `float`. That works out of the box when the compiler can see both ends and insert proper representation casts. Unfortunately, when crossing the compiler/interpreter boundary we use `void*` and that information is lost. This patch adds some representation adjustments so that the compiled code (SetArg) and the interpreted code (CallFunc) can agree on the memory representation before calling. Fixes root-project#14405
Option to reduce startup syscalls via environment caching 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.
PreviousNext