lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Feb 2023 11:12:17 +0000
From:   James Clark <james.clark@....com>
To:     Leo Yan <leo.yan@...aro.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Ian Rogers <irogers@...gle.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 13/14] perf kvm: Add TUI mode for stat report



On 28/02/2023 08:41, Leo Yan wrote:
> Since we have supported histograms list and prepared the dimensions in
> the tool, this patch adds TUI mode for stat report.  It also adds UI
> progress for sorting for better user experience.
> 
> Signed-off-by: Leo Yan <leo.yan@...aro.org>
> ---
>  tools/perf/builtin-kvm.c   | 110 ++++++++++++++++++++++++++++++++++++-
>  tools/perf/util/kvm-stat.h |   1 +
>  2 files changed, 109 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
> index 5b1b2042dfed..b0be59577779 100644
> --- a/tools/perf/builtin-kvm.c
> +++ b/tools/perf/builtin-kvm.c
> @@ -23,6 +23,8 @@
>  #include "util/data.h"
>  #include "util/ordered-events.h"
>  #include "util/kvm-stat.h"
> +#include "ui/browsers/hists.h"
> +#include "ui/progress.h"
>  #include "ui/ui.h"
>  #include "util/string2.h"
>  
> @@ -506,10 +508,98 @@ static int kvm_hists__init(struct perf_kvm_stat *kvm)
>  
>  	__hists__init(&kvm_hists.hists, &kvm_hists.list);
>  	perf_hpp_list__init(&kvm_hists.list);
> +	kvm_hists.list.nr_header_lines = 1;
>  	return kvm_hpp_list__parse(&kvm_hists.list, output_columns,
>  				   kvm->sort_key);
>  }
>  
> +static int kvm_browser__title(struct hist_browser *browser,
> +			      char *buf, size_t size)
> +{
> +	scnprintf(buf, size, "KVM event statistics (%lu entries)",
> +		  browser->nr_non_filtered_entries);
> +	return 0;
> +}
> +
> +static struct hist_browser*
> +perf_kvm_browser__new(struct hists *hists)
> +{
> +	struct hist_browser *browser = hist_browser__new(hists);
> +
> +	if (browser)
> +		browser->title = kvm_browser__title;
> +
> +	return browser;
> +}
> +
> +static void print_result(struct perf_kvm_stat *kvm);
> +
> +#ifdef HAVE_SLANG_SUPPORT

Hi Leo,

I get an error because of this addition when building on x86. I think
it's because I don't have HAVE_SLANG_SUPPORT. It might be the same error
that you mentioned on v1?

   builtin-kvm.c:535:13: error: ‘print_result’ used but never defined
[-Werror]
   535 | static void print_result(struct perf_kvm_stat *kvm);

Other than that, for the whole set:

Reviewed-by: James Clark <james.clark@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ