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