|
From: | Paolo Bonzini |
Subject: | Re: [PATCH 5/8] qmp: add filtering of statistics by provider |
Date: | Tue, 24 May 2022 18:42:16 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
On 5/24/22 14:32, Markus Armbruster wrote:
+ * @provider: stats providerArgument documentation that merely paraphrases the type is redundant. May I have a proper contract?
"stats provider matched against QMP command arguments"?
+static bool stats_provider_requested(StatsProvider provider, + StatsFilter *filter) +{ + StatsRequestList *request; + + if (!filter->has_providers) { + return true; + } + for (request = filter->providers; request; request = request->next) { + if (request->value->provider == provider) { + return true; + } + } + return false; +} +This is just like apply_str_list_filter(). Good! Could we make the two names similar, too?
It looks similar but there is a difference in patch 7, in that it also returns the "names" filter. I can rename it to find_stats_provider_filter() if you prefer.
All other suggestions applied, thanks. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |