qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v9 10/13] tb-stats: dump hot TBs at the end of the execution


From: Richard Henderson
Subject: Re: [PATCH v9 10/13] tb-stats: dump hot TBs at the end of the execution
Date: Tue, 8 Oct 2019 15:05:51 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 10/7/19 11:28 AM, Alex Bennée wrote:
> @@ -337,7 +336,8 @@ int qemu_str_to_log_mask(const char *str)
>              enable_collect_tb_stats();
>          } else if (tb_stats_collection_enabled() &&
>                     g_str_has_prefix(*tmp, "dump_limit=")) {
> -            max_num_hot_tbs_to_dump = atoi((*tmp) + 11);
> +            int hot_tbs = atoi((*tmp) + 11);
> +            set_tbstats_max_tbs(hot_tbs);

I think qemu_strtoi() is preferred over atoi().

My guess it that it's better to export a variable than a set_tbstats_max_tbs()
function.  I don't see any reason why stubs.c can't define variables -- they're
probably no larger than empty functions in many cases.


r~



reply via email to

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