projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a77e5e3
)
Add "Word size" to the +RTS --info output
author
Ian Lynagh
<igloo@earth.li>
Fri, 9 Jan 2009 16:04:54 +0000
(16:04 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Fri, 9 Jan 2009 16:04:54 +0000
(16:04 +0000)
rts/RtsUtils.c
patch
|
blob
|
history
diff --git
a/rts/RtsUtils.c
b/rts/RtsUtils.c
index
42bffed
..
4d78bcb
100644
(file)
--- 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);
}
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 */
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("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");
mkRtsInfoPair("Compiler unregisterised", GhcUnregisterised);
mkRtsInfoPair("Tables next to code", GhcEnableTablesNextToCode);
printf(" ]\n");