Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile: Link tcmalloc if present in the system
This patch links tcmalloc or tcmalloc_minimal libraries if the system has libtcmalloc or libtcmalloc_minimal. Using tcmalloc reduces the time to run EntryTest by 2%. Before: $ perf stat -r 10 -- ./jato -cp test/functional/ jvm/EntryTest Performance counter stats for './jato -cp test/functional/ jvm/EntryTest' (10 runs): 743,314 cache-misses # 0.914 M/sec ( +- 2.399% ) (scaled from 33.38%) 18,292,874 cache-references # 22.493 M/sec ( +- 1.037% ) (scaled from 33.57%) 7,372,729 branch-misses # 2.111 % ( +- 1.053% ) (scaled from 33.80%) 349,330,853 branches # 429.531 M/sec ( +- 0.382% ) (scaled from 33.95%) 1,871,598,945 instructions # 1.161 IPC ( +- 0.495% ) (scaled from 33.51%) 1,611,909,200 cycles # 1981.977 M/sec ( +- 0.241% ) (scaled from 33.16%) 8,912 page-faults # 0.011 M/sec ( +- 0.003% ) 0 CPU-migrations # 0.000 M/sec ( +- -nan% ) 143 context-switches # 0.000 M/sec ( +- 0.865% ) 813.283612 task-clock-msecs # 0.977 CPUs ( +- 0.095% ) 0.832314016 seconds time elapsed ( +- 0.131% ) After: $ sync && perf stat -r 10 -- ./jato -cp test/functional/ jvm/EntryTest Performance counter stats for './jato -cp test/functional/ jvm/EntryTest' (10 runs): 824,176 cache-misses # 1.042 M/sec ( +- 2.234% ) (scaled from 33.37%) 18,027,516 cache-references # 22.802 M/sec ( +- 1.645% ) (scaled from 33.86%) 6,414,001 branch-misses # 1.961 % ( +- 1.353% ) (scaled from 34.09%) 327,051,906 branches # 413.671 M/sec ( +- 0.356% ) (scaled from 33.55%) 1,775,159,432 instructions # 1.139 IPC ( +- 0.560% ) (scaled from 33.12%) 1,558,045,501 cycles # 1970.691 M/sec ( +- 0.211% ) (scaled from 33.31%) 9,631 page-faults # 0.012 M/sec ( +- 0.003% ) 0 CPU-migrations # 0.000 M/sec ( +- -nan% ) 138 context-switches # 0.000 M/sec ( +- 0.923% ) 790.608790 task-clock-msecs # 0.976 CPUs ( +- 0.087% ) 0.809892157 seconds time elapsed ( +- 0.096% ) Signed-off-by: Ana Farcasi <farcasia@gmail.com> [ penberg@kernel.org: cleanup, fix scripts/gcc-has-lib.sh ] Signed-off-by: Pekka Enberg <penberg@kernel.org>
- Loading branch information