[PATCH] D87901: [Driver] Filter out <libdir>/gcc and <libdir>/gcc-cross if they do not exists

Dmitry Antipov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 20:20:25 PDT 2020


dmantipov added a comment.

Thanks @MaskRay for the method, some of my numbers are shown below.

Before:

  # strace -fc -e file /home/antipov/.local/llvm-12.0.0/bin/clang++ test.cc 
  % time     seconds  usecs/call     calls    errors syscall
  ------ ----------- ----------- --------- --------- ----------------
  100.00    0.004000          12       333       254 openat
    0.00    0.000000           0        60           open
    0.00    0.000000           0       120        78 stat
    0.00    0.000000           0         8           lstat
    0.00    0.000000           0        68        53 access
    0.00    0.000000           0         3           execve
    0.00    0.000000           0         1           rename
    0.00    0.000000           0         4           unlink
    0.00    0.000000           0         7           readlink
    0.00    0.000000           0         1           chmod
  ------ ----------- ----------- --------- --------- ----------------
  100.00    0.004000           6       605       385 total
  
  # strace -fc -e file /home/antipov/.local/llvm-12.0.0/bin/clang++ -target mips-img-linux-gnu --gcc-toolchain=/home/antipov/.local/mips-img-linux-gnu/2017.10-05 --sysroot=/home/antipov/.local/mips-img-linux-gnu/2017.10-05/sysroot/mips-r6-hard test.cc 
  % time     seconds  usecs/call     calls    errors syscall
  ------ ----------- ----------- --------- --------- ----------------
    0.00    0.000000           0        60           open
    0.00    0.000000           0       125        76 stat
    0.00    0.000000           0        93           lstat
    0.00    0.000000           0        72        56 access
    0.00    0.000000           0         3           execve
    0.00    0.000000           0         1           rename
    0.00    0.000000           0         4           unlink
    0.00    0.000000           0         7           readlink
    0.00    0.000000           0         1           chmod
    0.00    0.000000           0       234       157 openat
  ------ ----------- ----------- --------- --------- ----------------
  100.00    0.000000           0       600       289 total

After:

  # strace -fc -e file /home/antipov/.local/llvm-12.0.0/bin/clang++ test.cc 
  % time     seconds  usecs/call     calls    errors syscall
  ------ ----------- ----------- --------- --------- ----------------
    0.00    0.000000           0        60           open
    0.00    0.000000           0       128        84 stat
    0.00    0.000000           0         8           lstat
    0.00    0.000000           0        68        53 access
    0.00    0.000000           0         3           execve
    0.00    0.000000           0         1           rename
    0.00    0.000000           0         4           unlink
    0.00    0.000000           0         7           readlink
    0.00    0.000000           0         1           chmod
    0.00    0.000000           0       245       166 openat
  ------ ----------- ----------- --------- --------- ----------------
  100.00    0.000000           0       525       303 total
  
  # strace -fc -e file /home/antipov/.local/llvm-12.0.0/bin/clang++ -target mips-img-linux-gnu --gcc-toolchain=/home/antipov/.local/mips-img-linux-gnu/2017.10-05 --sysroot=/home/antipov/.local/mips-img-linux-gnu/2017.10-05/sysroot/mips-r6-hard test.cc 
  % time     seconds  usecs/call     calls    errors syscall
  ------ ----------- ----------- --------- --------- ----------------
    0.00    0.000000           0        60           open
    0.00    0.000000           0       131        80 stat
    0.00    0.000000           0        93           lstat
    0.00    0.000000           0        72        56 access
    0.00    0.000000           0         3           execve
    0.00    0.000000           0         1           rename
    0.00    0.000000           0         4           unlink
    0.00    0.000000           0         7           readlink
    0.00    0.000000           0         1           chmod
    0.00    0.000000           0       200       123 openat
  ------ ----------- ----------- --------- --------- ----------------
  100.00    0.000000           0       572       259 total


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87901/new/

https://reviews.llvm.org/D87901



More information about the cfe-commits mailing list