#include "Basic_Consumer.hh"
Go to the source code of this file.
Functions | |
int | main (const unsigned int argc, const char **const argv) |
The entry point. |
|
The entry point.
Definition at line 28 of file basic-merge-main.cc. References Consumer::merge().
00028 { 00029 00030 // Were the correct number of arguments passed? 00031 if (argc != 3) { 00032 00033 // No. Emit usage and exit. 00034 fprintf(stderr, "Usage: %s\n", argv[0]); 00035 fprintf(stderr, " <reference trace pathname>\n"); 00036 fprintf(stderr, " <kernel trace pathname>\n"); 00037 return 1; 00038 00039 } 00040 00041 // Create the trace consumer object. 00042 Basic_Consumer* consumer = new Basic_Consumer(argv[1], argv[2]); 00043 if (consumer == 0) { 00044 fprintf(stderr, "main(): Failed allocation of Basic_Consumer\n"); 00045 return 1; 00046 } 00047 00048 // Merge the traces. 00049 consumer->merge(); 00050 00051 // Eliminate the consumer object. 00052 delete consumer; 00053 consumer = 0; 00054 00055 // Exit successfully. 00056 return 0; 00057 00058 } // main |