[canvaskit] Add profile mode

Firefox is the only browser that supports WASM+Source maps
so it's only really useful there.

It allows for profiling to see where time is speant, even
down in the C++ calls.  (see the below comment for a screenshot)

Bug: skia:
Change-Id: Ie0380bae9fdea45e1652dd7d2d8036f242087d33
Reviewed-on: https://skia-review.googlesource.com/c/174101
Reviewed-by: Mike Reed <reed@google.com>
diff --git a/experimental/canvaskit/compile.sh b/experimental/canvaskit/compile.sh
index c4249a3..4167cb7 100755
--- a/experimental/canvaskit/compile.sh
+++ b/experimental/canvaskit/compile.sh
@@ -28,6 +28,10 @@
   RELEASE_CONF="-O0 --js-opts 0 -s DEMANGLE_SUPPORT=1 -s ASSERTIONS=1 -s GL_ASSERTIONS=1 -g3 \
                 -DPATHKIT_TESTING -DSK_DEBUG --pre-js $BASE_DIR/debug.js"
   BUILD_DIR=${BUILD_DIR:="out/canvaskit_wasm_debug"}
+elif [[ $@ == *profiling* ]]; then
+  echo "Building a build for profiling"
+  RELEASE_CONF="-O3 --source-map-base /node_modules/canvaskit/bin/ --profiling -g4 -DSK_RELEASE --pre-js $BASE_DIR/release.js"
+  BUILD_DIR=${BUILD_DIR:="out/canvaskit_wasm_profile"}
 else
   BUILD_DIR=${BUILD_DIR:="out/canvaskit_wasm"}
 fi