run.sh 979 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. CXX=clang++
  3. FONT=fonts/NotoNastaliqUrdu-Regular.ttf
  4. TEXT=texts/fa-monologue.txt
  5. $CXX ../util/hb-shape.cc ../util/options.cc ../src/harfbuzz.cc \
  6. -lm -fno-rtti -fno-exceptions -fno-omit-frame-pointer -DHB_NO_MT \
  7. -I../src $FLAGS $SOURCES \
  8. -DPACKAGE_NAME='""' -DPACKAGE_VERSION='""' \
  9. -DHAVE_GLIB $(pkg-config --cflags --libs glib-2.0) \
  10. -o hb-shape -g -O2 # -O3 \
  11. #-march=native -mtune=native \
  12. #-Rpass=loop-vectorize -Rpass-missed=loop-vectorize \
  13. #-Rpass-analysis=loop-vectorize -fsave-optimization-record
  14. # -march=native: enable all vector instructions current CPU can offer
  15. # -Rpass*: https://llvm.org/docs/Vectorizers.html#diagnostics
  16. #sudo rm capture.syscap > /dev/null
  17. #sysprof-cli -c "./a.out $@"
  18. #sysprof capture.syscap
  19. perf stat ./hb-shape -o /dev/null $FONT --text-file $TEXT --num-iterations=100 --font-funcs=ot
  20. #perf record -g ./hb-shape -O '' -o /dev/null $FONT --text-file $TEXT --num-iterations=100 --font-funcs=ot
  21. #perf report -g