Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-25 Thread Wu, Fei
On 5/25/2023 1:02 AM, Richard Henderson wrote: > On 5/24/23 06:35, Wu, Fei wrote: >> On 5/23/2023 8:45 AM, Richard Henderson wrote: >>> On 5/18/23 06:57, Fei Wu wrote: +void HELPER(inc_exec_freq)(void *ptr) +{ +    TBStatistics *stats = (TBStatistics *) ptr; +    tcg_debug_asser

Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-24 Thread Wu, Fei
On 5/25/2023 1:02 AM, Richard Henderson wrote: > On 5/24/23 06:35, Wu, Fei wrote: >> On 5/23/2023 8:45 AM, Richard Henderson wrote: >>> On 5/18/23 06:57, Fei Wu wrote: +void HELPER(inc_exec_freq)(void *ptr) +{ +    TBStatistics *stats = (TBStatistics *) ptr; +    tcg_debug_asser

Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-24 Thread Richard Henderson
On 5/24/23 06:35, Wu, Fei wrote: On 5/23/2023 8:45 AM, Richard Henderson wrote: On 5/18/23 06:57, Fei Wu wrote: +void HELPER(inc_exec_freq)(void *ptr) +{ +    TBStatistics *stats = (TBStatistics *) ptr; +    tcg_debug_assert(stats); +    ++stats->executions.normal; +} ... +static inline void

Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-24 Thread Wu, Fei
On 5/23/2023 8:45 AM, Richard Henderson wrote: > On 5/18/23 06:57, Fei Wu wrote: >> +void HELPER(inc_exec_freq)(void *ptr) >> +{ >> +    TBStatistics *stats = (TBStatistics *) ptr; >> +    tcg_debug_assert(stats); >> +    ++stats->executions.normal; >> +} > ... >> +static inline void gen_tb_exec_co

Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-23 Thread Wu, Fei
On 5/23/2023 8:45 AM, Richard Henderson wrote: > On 5/18/23 06:57, Fei Wu wrote: >> +void HELPER(inc_exec_freq)(void *ptr) >> +{ >> +    TBStatistics *stats = (TBStatistics *) ptr; >> +    tcg_debug_assert(stats); >> +    ++stats->executions.normal; >> +} > ... >> +static inline void gen_tb_exec_co

Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-22 Thread Wu, Fei
On 5/23/2023 8:45 AM, Richard Henderson wrote: > On 5/18/23 06:57, Fei Wu wrote: >> +void HELPER(inc_exec_freq)(void *ptr) >> +{ >> +    TBStatistics *stats = (TBStatistics *) ptr; >> +    tcg_debug_assert(stats); >> +    ++stats->executions.normal; >> +} > ... >> +static inline void gen_tb_exec_co

Re: [PATCH v12 02/15] accel: collecting TB execution count

2023-05-22 Thread Richard Henderson
On 5/18/23 06:57, Fei Wu wrote: +void HELPER(inc_exec_freq)(void *ptr) +{ +TBStatistics *stats = (TBStatistics *) ptr; +tcg_debug_assert(stats); +++stats->executions.normal; +} ... +static inline void gen_tb_exec_count(TranslationBlock *tb) +{ +if (tb_stats_enabled(tb, TB_EXEC_S

[PATCH v12 02/15] accel: collecting TB execution count

2023-05-18 Thread Fei Wu
From: "Vanderson M. do Rosario" If a TB has a TBS (TBStatistics) with the TB_EXEC_STATS enabled, then we instrument the start code of this TB to atomically count the number of times it is executed. We count both the number of "normal" executions and atomic executions of a TB. The execution count