File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -145,15 +145,34 @@ jobs:
145145 run : |
146146 wget https://github.com/danmar/simplecpp/archive/refs/tags/1.5.1.tar.gz
147147 tar xvf 1.5.1.tar.gz
148+ rm -f 1.5.1.tar.gz
149+
148150 make clean
149- make -j$(nproc) CXXOPTS="-O2 -g3"
151+ make -j$(nproc) CXXOPTS="-O2 -g3" simplecpp
150152 VALGRIND_TOOL=callgrind SIMPLECPP_PATH=simplecpp-1.5.1 ./selfcheck.sh >callgrind.log || (cat callgrind.log && false)
151153 cat callgrind.log
154+
155+ # PGO - start
156+ make clean
157+ make -j$(nproc) CXXOPTS="-O2 -g3 -fprofile-generate" LDOPTS="-fprofile-generate" simplecpp
158+ SIMPLECPP_PATH=simplecpp-1.5.1 ./selfcheck.sh >/dev/null
159+
160+ if compgen -G "default_*.profraw" > /dev/null; then
161+ llvm-profdata merge -output=default.profdata default_*.profraw
162+ fi
163+
164+ make clean
165+ make -j$(nproc) CXXOPTS="-O2 -g3 -fprofile-use" LDOPTS="-fprofile-use" simplecpp
166+ VALGRIND_TOOL=callgrind SIMPLECPP_PATH=simplecpp-1.5.1 ./selfcheck.sh >callgrind_pgo.log || (cat callgrind_pgo.log && false)
167+ cat callgrind_pgo.log
168+ # PGO - end
169+
152170 for f in callgrind.out.*;
153171 do
154172 callgrind_annotate --auto=no $f > $f.annotated.log
155173 head -50 $f.annotated.log
156174 done
175+ rm -rf simplecpp-1.5.1
157176
158177 - uses : actions/upload-artifact@v4
159178 if : matrix.os == 'ubuntu-24.04'
You can’t perform that action at this time.
0 commit comments