qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure


From: Wu, Fei
Subject: Re: [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure
Date: Thu, 1 Jun 2023 13:36:29 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 6/1/2023 12:16 PM, Richard Henderson wrote:
> On 5/31/23 20:19, Wu, Fei wrote:
>> On 6/1/2023 8:01 AM, Richard Henderson wrote:
>>> On 5/30/23 01:35, Fei Wu wrote:
>>>> +/* TBStatistic collection controls */
>>>> +enum TBStatsStatus {
>>>> +    TB_STATS_DISABLED = 0,
>>>> +    TB_STATS_RUNNING,
>>>> +    TB_STATS_PAUSED,
>>>> +    TB_STATS_STOPPED
>>>> +};
>>>
>>> I don't see what PAUSED or STOPPED actually do.
>>> As far as I can see, stats are either being collected or not: a boolean.
>>>
>> If STOPPED, clean_tbstats() gets called, all the tbstats history is
>> destroyed, but it's not for PAUSED.
> 
> But it doesn't PAUSE everything either, since (1) code is built into
> each tb, and (2) each tb->tb_stats->stats_enabled neither changed. 
> Indeed, tb_stats_collection_enabled() is only checked in a fraction of
> the places stats are collected.
> 
tbs are always flushed at the end of hmp tb-stats cmd by tb_flush(),
stats_enabled can be changed e.g. during pause/filter cmd. It should be
a bug if stats are collected w/o tb_stats_collection_enabled().

Thanks,
Fei.
> 
> r~
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]