• Leo Yan's avatar
    perf kvm: Use histograms list to replace cached list · f57a6414
    Leo Yan authored
    perf kvm tool defines its own cached list which is managed with RB tree,
    histograms also provide RB tree to manage data entries.  Since now we
    have introduced histograms in the tool, it's not necessary to use the
    self defined list and we can directly use histograms list to manage
    KVM events.
    
    This patch changes to use histograms list to track KVM events, and it
    invokes the common function hists__output_resort_cb() to sort result,
    this also give us flexibility to extend more sorting key words easily.
    
    After histograms list supported, the cached list is redundant so remove
    the relevant code for it.
    
    Committer notes:
    
    kvm_hists__reinit() is only used by functions enclosed in:
    
      #if defined(HAVE_KVM_STAT_SUPPORT) && defined(HAVE_LIBTRACEEVENT)
    
    So do it with this new function as well.
    Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: James Clark <james.clark@arm.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: John Garry <john.g.garry@oracle.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: linux-arm-kernel@lists.infradead.org
    Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    f57a6414
builtin-kvm.c 44.2 KB