aboutsummaryrefslogtreecommitdiff
path: root/system/include/emscripten.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-10-28 14:05:59 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-10-28 14:05:59 -0700
commit1488cc47f25bd98ea897f56ac1cc096edf1d0da1 (patch)
tree946893d28d4d60b7e668456984cc68d6f860e0d3 /system/include/emscripten.h
parentb8ffc3d9016fe2eef894a6957bbb90ab97d54691 (diff)
profiling option from C++
Diffstat (limited to 'system/include/emscripten.h')
-rw-r--r--system/include/emscripten.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/system/include/emscripten.h b/system/include/emscripten.h
index 4d321b2c..0ce31e9f 100644
--- a/system/include/emscripten.h
+++ b/system/include/emscripten.h
@@ -23,6 +23,19 @@ extern void emscripten_run_script(const char *script);
*/
extern void EMSCRIPTEN_COMMENT(const char *text);
+/*
+ * Profiling tools.
+ * INIT must be called first, with the maximum identifier that
+ * will be used. BEGIN will add some code that marks
+ * the beginning of a section of code whose run time you
+ * want to measure. END will finish such a section. Note: If you
+ * call begin but not end, you will get invalid data!
+ * The profiling data will be written out if you call Profile.dump().
+ */
+extern void EMSCRIPTEN_PROFILE_INIT(int max);
+extern void EMSCRIPTEN_PROFILE_BEGIN(int id);
+extern void EMSCRIPTEN_PROFILE_END(int id);
+
#ifdef __cplusplus
}
#endif