summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/main.cc')
-rw-r--r--Build/source/utils/asymptote/main.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/main.cc b/Build/source/utils/asymptote/main.cc
index bd07c34a537..6be24a1df42 100644
--- a/Build/source/utils/asymptote/main.cc
+++ b/Build/source/utils/asymptote/main.cc
@@ -53,6 +53,12 @@ namespace run {
void purge();
}
+#ifdef PROFILE
+namespace vm {
+extern void dumpProfile();
+};
+#endif
+
#ifdef HAVE_LIBSIGSEGV
void stackoverflow_handler (int, stackoverflow_context_t)
{
@@ -155,6 +161,10 @@ void *asymain(void *A)
}
}
+#ifdef PROFILE
+ vm::dumpProfile();
+#endif
+
if(getSetting<bool>("wait")) {
int status;
while(wait(&status) > 0);