mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Better script to collect symbols statistics
This commit is contained in:
parent
4021e9a507
commit
c6e40a9288
@ -109,8 +109,19 @@ ENGINE = MergeTree
|
|||||||
ORDER BY (date, file, symbol, pull_request_number, commit_sha, check_name);
|
ORDER BY (date, file, symbol, pull_request_number, commit_sha, check_name);
|
||||||
///
|
///
|
||||||
|
|
||||||
find "$INPUT_DIR" -type f -name '*.o' | grep -v cargo | find . -name '*.o' | xargs -P $(nproc) -I {} bash -c "
|
# nm does not work with LTO
|
||||||
nm --demangle --defined-only --print-size '{}' | grep -v -P '[0-9a-zA-Z] r ' | sed 's@^@{} @' > '{}.symbols'
|
if ! grep -q -- '-flto' compile_commands.json
|
||||||
"
|
then
|
||||||
|
# Find the best alternative of nm
|
||||||
|
for name in llvm-nm-{30..18} llvm-nm nm
|
||||||
|
do
|
||||||
|
NM=$(command -v ${name})
|
||||||
|
[[ -n "${NM}" ]] && break
|
||||||
|
done
|
||||||
|
|
||||||
find "$INPUT_DIR" -type f -name '*.o.symbols' | xargs cat > "${OUTPUT_DIR}/binary_symbols.txt"
|
find "$INPUT_DIR" -type f -name '*.o' | grep -v cargo | find . -name '*.o' | xargs -P $(nproc) -I {} bash -c "
|
||||||
|
${NM} --demangle --defined-only --print-size '{}' | grep -v -P '[0-9a-zA-Z] r ' | sed 's@^@{} @' > '{}.symbols'
|
||||||
|
"
|
||||||
|
|
||||||
|
find "$INPUT_DIR" -type f -name '*.o.symbols' | xargs cat > "${OUTPUT_DIR}/binary_symbols.txt"
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user