Skip to content

Commit

Permalink
add a stat for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jul 3, 2023
1 parent 9baf058 commit 91f446f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,7 @@ block_exit(struct exec_context *ctx, uint32_t blockpc, bool goto_else,
}
get_arity_for_blocktype(m, blocktype, &param_arity, &arity);
} else {
STAT_INC(ctx->stats.jump_loop);
const int64_t blocktype = read_leb_s33_nocheck(&p);
get_arity_for_blocktype(m, blocktype, &param_arity, &arity);
ctx->p = blockp;
Expand Down Expand Up @@ -1399,6 +1400,7 @@ exec_context_print_stats(struct exec_context *ctx)
STAT_PRINT(jump_cache2_hit);
STAT_PRINT(jump_cache_hit);
STAT_PRINT(jump_table_search);
STAT_PRINT(jump_loop);
STAT_PRINT(type_annotation_lookup1);
STAT_PRINT(type_annotation_lookup2);
STAT_PRINT(type_annotation_lookup3);
Expand Down
1 change: 1 addition & 0 deletions lib/exec_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ struct exec_stat {
uint64_t jump_cache_hit;
uint64_t jump_cache2_hit;
uint64_t jump_table_search;
uint64_t jump_loop;
uint64_t type_annotation_lookup1;
uint64_t type_annotation_lookup2;
uint64_t type_annotation_lookup3;
Expand Down

0 comments on commit 91f446f

Please sign in to comment.