29 #define HASH_SIZE (1<<20)
30 #define hash(p) ((((Cell)(p))/sizeof(Inst))&(HASH_SIZE-1))
54 while (b!=NULL && b->
ip!=ip)
72 new->insts = malloc(1);
73 assert(new->insts != NULL);
75 blocks[
hash(ip)] =
new;
102 while (next_block == NULL) {
103 #include "java-profile.i"
116 while (next_block != NULL) {
130 for (; b!=0; b = b->
next)
140 fprintf(file,
"%14lld\t",b->
count);
141 for (i=0; i<b->
ninsts; i++)
142 fprintf(file,
"%s ", b->
insts[i]);
152 for (j=0; i+j<=b->
ninsts; j++) {
153 fprintf(file,
"%14lld\t",b->
count);
154 for (k=j; k<i+j; k++)
155 fprintf(file,
"%s ", b->
insts[k]);
167 for (; b!=0; b = b->
next)
void postprocess_block(block_count *b)
block_count * block_lookup(Inst *ip)
void vm_print_profile(FILE *file)
block_count * vm_block_insert(Inst *ip)
#define vm_uncount_block(_ip)
void vm_count_block(Inst *ip)
void print_block(FILE *file, block_count *b)
struct block_count * fallthrough
void add_inst(block_count *b, char *inst)
struct block_count * next
block_count * blocks[HASH_SIZE]