diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c index b8de4c6..b1461a8 100644 --- a/src/runtime/runtime.c +++ b/src/runtime/runtime.c @@ -120,6 +120,9 @@ static void fsl_rt_dump_stats(struct fsl_rt_ctx* fctx) fctx->fctx_stat.s_dyn_copy_c); fprintf(out_file, "dyn_alloc %"PRIu64"\n", fctx->fctx_stat.s_dyn_alloc_c); + fprintf(out_file, "typeinfo_alloc %"PRIu64"\n", + fctx->fctx_stat.s_typeinfo_alloc_generic_c); + if (stat_fname != NULL) fclose(out_file); diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h index a20ed53..1ad4664 100644 --- a/src/runtime/runtime.h +++ b/src/runtime/runtime.h @@ -37,6 +37,7 @@ struct fsl_rt_stat uint64_t s_get_offset_c; uint64_t s_dyn_copy_c; uint64_t s_dyn_alloc_c; + uint64_t s_typeinfo_alloc_generic_c; }; #include "io.h" diff --git a/src/runtime/scantool.c b/src/runtime/scantool.c index 3e8ea31..6723f92 100644 --- a/src/runtime/scantool.c +++ b/src/runtime/scantool.c @@ -253,7 +253,7 @@ static void scan_type(struct type_info* ti) unsigned int i; DEBUG_TOOL_ENTER(); - DEBUG_TOOL_WRITE("scanning: %s (%d usertypes) voff=%"PRIu64" bits. poff=%"PRIu64" bits. xlate=%p", + printf("scanning: %s (%d usertypes) voff=%"PRIu64" bits. poff=%"PRIu64" bits. xlate=%p\n", tt_by_ti(ti)->tt_name, tt_by_ti(ti)->tt_field_c, ti_offset(ti), diff --git a/src/runtime/type_info.c b/src/runtime/type_info.c index 814c58b..ee4cb3b 100644 --- a/src/runtime/type_info.c +++ b/src/runtime/type_info.c @@ -348,6 +348,8 @@ static struct type_info* typeinfo_alloc_generic( struct fsl_rt_table_type *tt; struct type_info *ret; + fsl_env->fctx_stat.s_typeinfo_alloc_generic_c++; + ret = malloc(sizeof(struct type_info)); /* set typenum */