Index: trunk/ppStats/src/ppStatsFromMetadataStats.c
===================================================================
--- trunk/ppStats/src/ppStatsFromMetadataStats.c	(revision 23989)
+++ trunk/ppStats/src/ppStatsFromMetadataStats.c	(revision 36914)
@@ -1,3 +1,5 @@
 # include "ppStatsInternal.h"
+
+static void computeBitwiseOr(ppStatsEntry *entry);
 
 // calculate the stats for the non-constant entries (already calculated)
@@ -11,4 +13,9 @@
         // XXX skip or warn on missing stats?
         if (!entry->vector) continue;
+
+        if (!strcasecmp (entry->statistic, "bitwiseor")) {
+            computeBitwiseOr(entry);
+            continue;
+        }
 
         psStatsOptions option;
@@ -68,2 +75,27 @@
     return true;
 }
+
+static void computeBitwiseOr(ppStatsEntry *entry)
+{
+    psU64 result = 0;
+    psVector *vector = entry->vector;
+    for (int j = 0; j < vector->n; j++) {
+        // XXX: should we handle other types
+        if (entry->type == PS_DATA_U64) {
+            result |= vector->data.U64[j];
+        } else if (entry->type == PS_DATA_U32) {
+            result |= vector->data.U32[j];
+        } else {
+            return;
+        } 
+    }
+
+    if (entry->type == PS_DATA_U64) {
+        entry->value = psMetadataItemAllocU64(entry->keyword, entry->statistic, result);
+    } else {
+        entry->value = psMetadataItemAllocU32(entry->keyword, entry->statistic, result);
+    }
+
+    return;
+}
+
