Re: [PATCH 1/2] perf: Compute cache_l1d config value correctly

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

 



On Sat, Jan 14, 2017 at 01:49:59PM +0530, Nitesh Konkar wrote:
> This patch computes the .attrConfig value for
> cache_l1d correctly and updates the documentation.
> The cache_l1d perf event now is renamed as
> cache_l1dra perf event for measuring read accesses
> for level 1 data cache
> 
> Signed-off-by: Nitesh Konkar <nitkon12@xxxxxxxxxxxxxxxxxx>
> ---
>  docs/formatdomain.html.in                   | 12 ++++++------
>  docs/news.xml                               |  5 +++--
>  docs/schemas/domaincommon.rng               |  2 +-
>  include/libvirt/libvirt-domain.h            | 12 ++++++------
>  src/libvirt-domain.c                        |  5 +++--
>  src/qemu/qemu_driver.c                      |  2 +-
>  src/util/virperf.c                          |  8 +++++---
>  src/util/virperf.h                          |  2 +-
>  tests/genericxml2xmlindata/generic-perf.xml |  2 +-
>  tools/virsh.pod                             |  6 +++---
>  10 files changed, 30 insertions(+), 26 deletions(-)

I'm not really comfortable with us renaming the public API at this
late stage of the release, as it will have a ripple effect on all
the language bindings too.

IMHO, we need to just stick with this event name now.

> diff --git a/src/util/virperf.c b/src/util/virperf.c
> index 8554723..11e64df 100644
> --- a/src/util/virperf.c
> +++ b/src/util/virperf.c
> @@ -113,9 +113,11 @@ static struct virPerfEventAttr attrs[] = {
>       .attrConfig = 0,
>  # endif
>      },
>       .attrType = PERF_TYPE_HW_CACHE,
> -     .attrConfig = PERF_COUNT_HW_CACHE_L1D},
> +     .attrConfig = (PERF_COUNT_HW_CACHE_L1D) |
> +                   (PERF_COUNT_HW_CACHE_OP_READ << 8) |
> +                   (PERF_COUNT_HW_CACHE_RESULT_ACCESS << 16)},
>  };

So this looks like the only part of the patch that we need to
take.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux