if (options.generate_statistics) { options.reportGeneratedStatistics(traceHeader); }
  static public void main(String args[])   {    options = new CommandLineOptions();    if (args.length < 1) {      options.usage();    }    options.processArgs(args, false);    // looking for a subset of trace records?    if (options.application != null || options.run != -1) {      subsetOnly = true;    }    // At this point we know how many trace files there are    //    Trace[] traces = new Trace[options.trace_file_index];    // allocate array for start wall time.    start_wall_times         = new long[options.trace_file_index];    // contains the information from all traces    Trace super_trace = null;    // read in data for all the trace files    for (int i=0; i<options.trace_file_index; i++) {      TraceCounterRecord.start_time = 0;      //      options.resetStatistics();      String trace_filename = options.trace_filenames[i];      if(options.debug>=1)System.out.println("main() start of iteration "+i+" with trace file \""+					     trace_filename+"\"");      DataInputStream input_file = Utilities.openDataInputStream(trace_filename);      // read version       readVersion(input_file, trace_filename);      // read meta trace file name and process it      readMetaFile(input_file, trace_filename);      // read trace records      TraceRecord[] records = readTraceRecords(input_file, trace_filename);      start_wall_times[i] = trace_file_start_wall_time;      Trace trace = new Trace(traceHeader, records);      //      traces[i] = trace;      if (super_trace == null) {	super_trace = trace;      } else {	super_trace.merge(trace);      }      if(options.print_local) {	if (options.generate_statistics) {	  options.reportGeneratedStatistics(traceHeader);	}	if (options.print_aggregate){	  aggregate(false);	}	if (options.print_aggregate_by_thread){	  aggregate(true);	}      }      if(options.debug>=2)System.out.println("main() end of iteration "+i);    } // end for i<trace_file_index    if (options.print_structure) {      build_structure(super_trace);      print_structure();    }    if(options.generate_statistics){      options.reportGeneratedStatistics(super_trace.header);    }    // process trace records    if (options.print_trace || options.print_aggregate || options.print_aggregate_by_thread) {      // determine what the start and end trace records should be.      int start = find_start_record_number();      int end   = find_end_record_number(super_trace.records.length);      if (options.print_trace) {	// find least start wall time and use from which to adjust all start wall times.	start_wall_time = Long.MAX_VALUE;	for (int i=0; i<options.trace_file_index; i++) {	  if (start_wall_times[i] < start_wall_time) {	    start_wall_time = start_wall_times[i];	  }	}	TraceCounterRecord.start_time = start_wall_time;	System.out.println("Trace:");      }      for (int i=start; i<end; i++) {	TraceRecord tr = super_trace.records[i];	if (options.print_trace)	  printTraceRecord(tr, i);	updateCummulativeCounters(tr);      }      if (options.print_aggregate){	aggregate(false);      }      if (options.print_aggregate_by_thread){	aggregate(true);      }    }  }