Hi,

On Fri, Jun 10, 2016 at 12:39 PM, Willy WOLFF <willy.mh.wo...@gmail.com>
wrote:

> Dear libpfm developers and users,
>
> I'm new to this tool.
>
> I would like to do precise accounting for an application running on a
> big.LITTLE system (quad A7 & quad A15).
>

I doubt BIG.little is supported as you expect. I am not sure both PMU are
supported at the same time. I am sure you'll get one
of the two. It all depends on which CPU is used to boot the kernel.



> For instance, I would like to have precise PMC value for my application
> only (without kernel threads or other running applications) for all
> available cores on the machine.
>
> This is called per-pthread monitoring and is supported by perf_events (the
kernel interface to access the performance counters), and the perf tool.


> As an example, if I want cpu-cycles and context-switches counters, and if
> I taskset/sched_setaffinity my application to stick to a specific core,
> counters from other cores than the sticked core will have 0 (or really
> close to, until the core affinity is done).
>
> You can do that with the perf tool, for instance: perf stat -a -C 0 -e
cycles:u sleep 1. This measures cycles for 1s on Core 0 (user only).


> After small test with checkevent and showevtinfo, the pmu
> detection/selection chose only one pmu at a time, not both arm_ac7 and
> arm_ac15. I try to force both pmu with LIBPFM_FORCE_PMU environment
> variable, but it seems to not working.
>
> Yea, libpfm4 does not support dual hybrid PMU modes at the moment. So it
will tell you whichever you run on when you initialize the library.


> - Is it possible to specify an event, and get the values for all cores in
> an unaggregated manner?
>

libpfm4 does not measure anything by itself. It is just a helper library to
convert from symbolic event names to encodings for perf_events.
The perf tool can give you what you want (but it is not using libpfm4).
perf stat -a -A will break down perf core and measure all cores that are
online when the tool is started.


> - Is it possible to mix multiple pmus?
>

Yes, but now for core PMUs. It works with core and uncore PMUs.
The issue here is there the library only uses a CPUID function or
/proc/cpuinfo to figure out the type of processors available. In the case
of BIG.little, /proc/cpuinfo only shows one processor model. So there is no
way to tell. If there were, libpfm4 could be modified to enable two
distinct core PMU models.


> - Is it possible to select an event from its IDX? For instance, mixing
> this two event:
>    - IDX         : 157286411
>      PMU name : arm_ac15 (ARM Cortex A15)
>      Name     : CPU_CYCLES
>
>    - IDX         : 320864273
>      PMU name : arm_ac7 (ARM Cortex A7)
>      Name     : CPU_CYCLES
>
> You can encode for non-detected host PMU, by setting
 LIBPFM_ENCODE_INACTIVE=1, then you need to force the pmu model name:
     skl::inst_Retired,ivb:uops_retired:any

where skl and ivb are not PMU names.

I do not have a BIG.little machine to test how to handle this better. But I
think your limiting factor is going to be the kernel support for dual core
PMU.


>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to