aboutsummaryrefslogtreecommitdiff
path: root/src/preamble.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-06 18:12:28 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-06 18:12:28 -0800
commite123bd5a0dbaaa800761eb56792e42a00d0a72de (patch)
tree1d5fba53fa320d8b3b5fe66d51753465ef4efdb4 /src/preamble.js
parent27adc83bb2454fc71149b3efdae93d9c323d3bac (diff)
put some PGO code behind and ifdef
Diffstat (limited to 'src/preamble.js')
-rw-r--r--src/preamble.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js
index c8e3570a..25e3e754 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -178,6 +178,7 @@ var CorrectionsMonitor = {
#endif
},
+#if PGO
print: function() {
var items = [];
for (var sig in this.sigs) {
@@ -194,6 +195,7 @@ var CorrectionsMonitor = {
print(item.sig + ' : ' + item.total + ' hits, %' + (Math.ceil(100*item.fails/item.total)) + ' failures');
}
}
+#end
};
#if CHECK_OVERFLOWS
@@ -659,7 +661,9 @@ function __shutdownRuntime__() {
// allow browser to GC, set heaps to null?
// Print summary of correction activity
+#if PGO
CorrectionsMonitor.print();
+#endif
}