[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] [PATCH 4/4] embedded: Allow to disable the profiling su
From: |
Holger Hans Peter Freyther |
Subject: |
[Help-smalltalk] [PATCH 4/4] embedded: Allow to disable the profiling support in the interpreter |
Date: |
Sun, 5 May 2013 11:26:02 +0200 |
On ARM9 (e.g. TI Davinci DM644x) disabling the bytecode counter makes
a significant difference on the Bench.st benchmark.
2013-04-28 Holger Hans Peter Freyther <address@hidden>
* libgst/vm.def: Use INCR_LOCAL_COUNTER instead LOCAL_COUNTER++.
* libgst/interp-bc.inl: Add INCR_LOCAL_COUNTER and allow to disable
it when ENABLE_PROFILING is not defined.
---
configure.ac | 9 +++++++++
libgst/ChangeLog | 6 ++++++
libgst/interp-bc.inl | 6 ++++++
libgst/vm.def | 4 ++--
4 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index e0cb5e6..77c0473 100644
--- a/configure.ac
+++ b/configure.ac
@@ -664,6 +664,15 @@ if test "$enable_prefetch" != no; then
[Define to enable usage of __builtin_prefetch])
fi
+AC_ARG_ENABLE(profiling,
+[ --disable-profiling disable profiling support], ,
+enable_profiling=yes)
+
+if test "$enable_profiling" != no; then
+ AC_DEFINE(ENABLE_PROFILING, 1,
+ [Define to enable counting bytecodes for profiling support])
+fi
+
GST_ARG_ENABLE_MODULES([Blox,TCP])
dnl
diff --git a/libgst/ChangeLog b/libgst/ChangeLog
index f952307..ea7ef85 100644
--- a/libgst/ChangeLog
+++ b/libgst/ChangeLog
@@ -1,5 +1,11 @@
2013-04-28 Holger Hans Peter Freyther <address@hidden>
+ * libgst/vm.def: Use INCR_LOCAL_COUNTER instead LOCAL_COUNTER++.
+ * libgst/interp-bc.inl: Add INCR_LOCAL_COUNTER and allow to disable
+ it when ENABLE_PROFILING is not defined.
+
+2013-04-28 Holger Hans Peter Freyther <address@hidden>
+
* libgst/gstpriv.h: Allow to disable the DO_PREFETCH.
2013-04-25 Holger Hans Peter Freyther <address@hidden>
diff --git a/libgst/interp-bc.inl b/libgst/interp-bc.inl
index 8819481..edfa0c6 100644
--- a/libgst/interp-bc.inl
+++ b/libgst/interp-bc.inl
@@ -463,6 +463,12 @@ _gst_interpret (OOP processOOP)
LOCAL_COUNTER = 0)
#endif
+#ifdef ENABLE_PROFILING
+# define INCR_LOCAL_COUNTER LOCAL_COUNTER++
+#else
+# define INCR_LOCAL_COUNTER
+#endif
+
/* If we have a good quantity of registers, activate more caching mechanisms.
*/
#if REG_AVAILABILITY >= 2
OOP self_cache, *temp_cache, *lit_cache;
diff --git a/libgst/vm.def b/libgst/vm.def
index fb0b61b..0854828 100644
--- a/libgst/vm.def
+++ b/libgst/vm.def
@@ -205,12 +205,12 @@
operation PREFETCH ( -- ) {
PREFETCH;
- LOCAL_COUNTER++;
+ INCR_LOCAL_COUNTER;
}
operation ADVANCE ( -- ) {
ip += 2;
- LOCAL_COUNTER++;
+ INCR_LOCAL_COUNTER;
}
/* EXT_BYTE extends the argument of the next bytecode; it includes a
--
1.7.10.4
[Help-smalltalk] [PATCH 4/4] embedded: Allow to disable the profiling support in the interpreter,
Holger Hans Peter Freyther <=
Re: [Help-smalltalk] [PATCH 1/4] embedded: Use more registers on ARM as there are plenty and reduce the alignment, Paolo Bonzini, 2013/05/11