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