public void logSargResult(int stripeIx, boolean[] rgsToRead) {
    if (log == null) return;
    int offset = this.offset;
    int elements = (rgsToRead.length >> 6) + ((rgsToRead.length & 63) == 0 ? 0 : 1);
    if (offset + elements + 2 > log.length) return;
    log[offset] = makeIntPair(SARG_RESULT2, stripeIx);
    log[offset + 1] = rgsToRead.length;
    for (int i = 0, valOffset = 0; i < elements; ++i, valOffset += 64) {
      long val = 0;
      for (int j = 0; j < 64; ++j) {
        int ix = valOffset + j;
        if (rgsToRead.length == ix) break;
        if (!rgsToRead[ix]) continue;
        val = val | (1 << j);
      }
      log[offset + i + 2] = val;
    }
    this.offset += (elements + 2);
  }
Single threaded IO trace.
Note: this can be made MTT merely by using an AtomicInteger, and storing a thread ID.
ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/IoTrace.java