1 #define VERSION "24-Jan-94"
2 #define PROGNAME "ICount"
19 static long long info[NIHASH];
21 #define STATS_FILE "ICNT"
26 #define CHECKPOINT 1000000 /* reporting frequency */
27 static long countdown = CHECKPOINT;
29 char *anal_usage = "";
30 char *anal_version = VERSION;
32 initialize(argc,argv,envp)
39 shade_trctl_trsize(sizeof(Trace));
41 shade_trctl_it (IT_ANY, 1, 0, TC_IH);
44 for (j = 0; j < NIHASH; j++)
48 int analyze(argc,argv,envp)
55 for (i = 0; tr = shade_step(); i++) {
57 info[tr->tr_ih] += 1LL;
59 if (countdown-- < 0) {
60 print_results("Intermediate:");
61 countdown = CHECKPOINT;
70 print_results("Final:");
78 static FILE *statf = NULL;
80 if ((statf = fopen("ICNT", "w")) == NULL) {
81 fprintf(stderr, "Cannot open statistics file ICNT\n");
84 fprintf(statf, "%s\n\n", header);
86 for (i = 0; i < NIHASH; i++) {
87 fprintf(statf, "%8x: %8ld\n", i, (long) info[i]);