summaryrefslogtreecommitdiff
path: root/rts/RtsUtils.c
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-01-09 16:04:54 +0000
committerIan Lynagh <igloo@earth.li>2009-01-09 16:04:54 +0000
commit5009cff46241dbfdea03010683807e1b891726ac (patch)
treee7f0a44bb3f4b39c2d707b5a1299b515819a709d /rts/RtsUtils.c
parenta77e5e35a757f75a7f46749df1aa7aaa999718a9 (diff)
downloadhaskell-5009cff46241dbfdea03010683807e1b891726ac.tar.gz
Add "Word size" to the +RTS --info output
Diffstat (limited to 'rts/RtsUtils.c')
-rw-r--r--rts/RtsUtils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c
index 42bffed514..4d78bcb360 100644
--- a/rts/RtsUtils.c
+++ b/rts/RtsUtils.c
@@ -473,6 +473,11 @@ static void mkRtsInfoPair(char *key, char *val) {
printf(" ,(\"%s\", \"%s\")\n", key, val);
}
+/* This little bit of magic allows us to say TOSTRING(SYM) and get
+ * "5" if SYM is 5 */
+#define TOSTRING2(x) #x
+#define TOSTRING(x) TOSTRING2(x)
+
void printRtsInfo(void) {
/* The first entry is just a hack to make it easy to get the
* commas right */
@@ -491,6 +496,7 @@ void printRtsInfo(void) {
mkRtsInfoPair("Target architecture", TargetArch);
mkRtsInfoPair("Target OS", TargetOS);
mkRtsInfoPair("Target vendor", TargetVendor);
+ mkRtsInfoPair("Word size", TOSTRING(WORD_SIZE_IN_BITS));
mkRtsInfoPair("Compiler unregisterised", GhcUnregisterised);
mkRtsInfoPair("Tables next to code", GhcEnableTablesNextToCode);
printf(" ]\n");