clayborg added a comment.

Some perf numbers that involve loading a large iOS Application and all of its 
shared libraries without caching first and then with caching are found below. 
The "lldb-perf.py" command will start a timer, run any LLDB commands and then 
stop the timer and print out. Before the first run, I run "sudo purge" to purge 
the kernel file cache, and then I run one "cold" run with the file caches being 
empty. Then I run the same thing again with hot file caches. So the first run 
is always slower.

First run with no cache enabled:

  $ lldb-perf.py --lldb 
/Users/gclayton/Documents/src/llvm/main-clean/Release/bin/lldb --command 'file 
Facebook.app'
  ------------------------------------------------------------------------
  Cold file cache run:
  ------------------------------------------------------------------------
  (lldb) script import time; start_time = time.perf_counter()
  (lldb) file Facebook.app
  Current executable set to 'Facebook.app' (x86_64).
  (lldb) script print(time.perf_counter() - start_time)
  10.961282056
  (lldb) quit
  ------------------------------------------------------------------------
  Warm file cache run:
  ------------------------------------------------------------------------
  (lldb) script import time; start_time = time.perf_counter()
  (lldb) file Facebook.app
  Current executable set to 'Facebook.app' (x86_64).
  (lldb) script print(time.perf_counter() - start_time)
  6.4026089829999995
  (lldb) quit
  ------------------------------------------------------------------------
  Warm file cache run:
  ------------------------------------------------------------------------
  (lldb) script import time; start_time = time.perf_counter()
  (lldb) file Facebook.app
  Current executable set to 'Facebook.app' (x86_64).
  (lldb) script print(time.perf_counter() - start_time)
  6.43446597
  (lldb) quit

Second run with caching enabled:

  $ lldb-perf.py --lldb 
/Users/gclayton/Documents/src/llvm/main-clean/Release/bin/lldb --command 
'settings set symbols.enable-lldb-modules-cache true' --command 'file 
Facebook.app'
  ------------------------------------------------------------------------
  Cold file cache run:
  ------------------------------------------------------------------------
  (lldb) script import time; start_time = time.perf_counter()
  (lldb) settings set symbols.enable-lldb-modules-cache true
  (lldb) file Facebook.app
  Current executable set to 'Facebook.app' (x86_64).
  (lldb) script print(time.perf_counter() - start_time)
  9.102131989
  (lldb) quit
  ------------------------------------------------------------------------
  Warm file cache run:
  ------------------------------------------------------------------------
  (lldb) script import time; start_time = time.perf_counter()
  (lldb) settings set symbols.enable-lldb-modules-cache true
  (lldb) file Facebook.app
  Current executable set to 'Facebook.app' (x86_64).
  (lldb) script print(time.perf_counter() - start_time)
  4.374525497
  (lldb) quit
  ------------------------------------------------------------------------
  Warm file cache run:
  ------------------------------------------------------------------------
  (lldb) script import time; start_time = time.perf_counter()
  (lldb) settings set symbols.enable-lldb-modules-cache true
  (lldb) file Facebook.app
  Current executable set to 'Facebook.app' (x86_64).
  (lldb) script print(time.perf_counter() - start_time)
  4.353001629
  (lldb) quit

Results from one large project:
20% faster for cold file caches
47% faster for warm file caches


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113789

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to