react/scripts/perf-counters/Makefile
Ben Alpert 3b28c72142 Add rudimentary jsc perf-counters runner
Works at least on a CentOS 7 machine after running `sudo yum install
webkitgtk webkitgtk-devel`.

The only globals you get are `print` and `PerfCounters`. No `console` nor the other globals provided by the `jsc` command-line tool (load, readFile, etc) though they're probably not hard to implement.

You can disable the JIT by setting the environment variable `JSC_useJIT=false`.

Test Plan:
```
~/local/react/scripts/perf-counters$ make
~/local/react/scripts/perf-counters$ build/jsc-perf <(echo 'PerfCounters.init(); var a = PerfCounters.getCounters().instructions; print("moo"); var b = PerfCounters.getCounters().instructions; print(b - a);')
moo
72182
~/local/react/scripts/perf-counters$
```
2015-09-30 23:36:06 -07:00

4 lines
189 B
Makefile

build/jsc-perf: src/*
mkdir -p build
g++ -std=c++11 -I/usr/include/webkitgtk-1.0/ -ljavascriptcoregtk-1.0 src/jsc-perf.cpp src/hardware-counter.cpp src/thread-local.cpp -o build/jsc-perf