Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Question about importing a multi-cpu perf capture in TraceCompass


On 15-12-21 09:53 AM, Jerome CORRENOZ wrote:
>
> Hi Matthew,
>
>  
>
> Thanks a lot for your patch proposal !
>
>  
>
> I've done 2 changes to make it working fine with my trace as following
> with comment //
>
>  
>
Those changes look good, do they work for you? if so, we can look in to
productifying a solution.

> I’ll look how to provide you with a trace for your tests through a
> bugzilla, so you could test with it before submitting the patch.
>

Cool, bear in mind that if a trace is submitted to bugzilla we try to
integrate it into our regression tests. So that trace will be around for
a while. :)
>
>  
>
> Thanks again !
>
>  
>
> Incidentally, does exist a way to create a hierarchy by CPU in the
> “Control Flow” view ?
>

Well, I'm not sure, a "Control flow" abstracts out the CPU in favour of
showing threads over time. Maybe you want it in a "Resources" view? Can
you maybe sketch up in paint/gimp what you're talking about?

Would your CPU architecture have traces on accelerators like a GPU?
would it be multi-level like an Intel Q6600 where it's 2 dual cores with
a high speed bus? Would you have a magny core system and try to show
snaking of threads?

>  
>
> BR,
>
>   Jerome
>
>  
>
>  
>
> -----Original Message-----
> From: tracecompass-dev-bounces@xxxxxxxxxxx
> [mailto:tracecompass-dev-bounces@xxxxxxxxxxx] On Behalf Of Matthew Khouzam
> Sent: Friday, December 18, 2015 9:51 PM
> To: tracecompass-dev@xxxxxxxxxxx
> Subject: Re: [tracecompass-dev] Question about importing a multi-cpu
> perf capture in TraceCompass
>
>  
>
> Jerome, could you try to change the file CtfCpuAspect.java in
> tmf.ctf.core to this
>
>  
>
> /*******************************************************************************
>
> * Copyright (c) 2014, 2015 Ericsson
>
> *
>
> * All rights reserved. This program and the accompanying materials are
>
> * made available under the terms of the Eclipse Public License v1.0 which
>
> * accompanies this distribution, and is available at
>
> * http://www.eclipse.org/legal/epl-v10.html
>
> *
>
> * Contributors:
>
> *   Alexandre Montplaisir - Initial API and implementation
>
> *******************************************************************************/
>
>  
>
> package org.eclipse.tracecompass.tmf.ctf.core.event.aspect;
>
>  
>
> import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
>
> import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
>
> import org.eclipse.tracecompass.tmf.core.event.aspect.TmfCpuAspect;
>
> import org.eclipse.tracecompass.tmf.ctf.core.event.CtfTmfEvent;
>
>  
>
> /**
>
> * "CPU" event aspect for CTF traces.
>
> *
>
> * @author Alexandre Montplaisir
>
> */
>
> public class CtfCpuAspect extends TmfCpuAspect {
>
>  
>
>     @Override
>
>     public Integer resolve(ITmfEvent event) {
>
>         if (!(event instanceof CtfTmfEvent)) {
>
>             return null;
>
>         }
>
>         int cpu = ((CtfTmfEvent) event).getCPU();
>
>         if (cpu == 0) {
>
>             final ITmfEventField field =
> event.getContent().getField("perf_cpu");
>
>             if (field != null) {
>
>                 final Object value = field.getValue();
>
>                 if (value instanceof Long) {
>
>                     cpu = (int) value;
>
>                 }
>
>             }
>
>         }
>
>         return cpu;
>
>     }
>
> }
>
>  
>
>  
>
> It seems to work here. I want to confirm before productifying the patch.
>
>  
>
> On 15-12-18 09:46 AM, Jerome CORRENOZ wrote:
>
> > 
>
> > Hi,
>
> > 
>
> > 
>
> > 
>
> > I’m starting to use TraceCompass to import a perf trace.
>
> > 
>
> > 
>
> > 
>
> > I have a problem with multi-CPU. Indeed, the trace has been captured
>
> > on a multi-CPU but all the events seem to be associated to CPU0 (see
>
> > the table view, column “CPU”) whereas the “Contents” correctly
>
> > contains the “perf_cpu=X”. This impacts the “Resources” view where
>
> > only CPU0 is displayed but mainly the “Control Flow” view.
>
> > 
>
> > 
>
> > 
>
> > I’m using:
>
> > 
>
> > -    perf 4.1.1 on ARMv7
>
> > 
>
> > -    TraceCompass 1.1.0
>
> > 
>
> > 
>
> > 
>
> > Doing the following:
>
> > 
>
> > 
>
> > 
>
> > #perf record –e ‘sched :*’ –a
>
> > 
>
> > #perf data convert –to-ctf=./ctf
>
> > 
>
> > Then Open the ctf file (called perf_stream_0) in TraceCompass
>
> > 
>
> > 
>
> > 
>
> > Any ideas about the cause of it ?
>
> > 
>
> > 
>
> > 
>
> > BR,
>
> > 
>
> >   Jerome
>
> > 
>
> > 
>
> > 
>
> > 
>
> > 
>
> > 
>
> > 
>
> > _______________________________________________
>
> > tracecompass-dev mailing list
>
> > tracecompass-dev@xxxxxxxxxxx <mailto:tracecompass-dev@xxxxxxxxxxx>
>
> > To change your delivery options, retrieve your password, or
>
> > unsubscribe from this list, visit
>
> > https://dev.eclipse.org/mailman/listinfo/tracecompass-dev
>
>  
>
> _______________________________________________
>
> tracecompass-dev mailing list
>
> tracecompass-dev@xxxxxxxxxxx <mailto:tracecompass-dev@xxxxxxxxxxx>
>
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tracecompass-dev
>
>
>
> _______________________________________________
> tracecompass-dev mailing list
> tracecompass-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tracecompass-dev



Back to the top