Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756937Ab0HaIDj (ORCPT ); Tue, 31 Aug 2010 04:03:39 -0400 Received: from mail-qy0-f174.google.com ([209.85.216.174]:36783 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756889Ab0HaIDe (ORCPT ); Tue, 31 Aug 2010 04:03:34 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=fFbqqhFab1kVm0cIeIkbUiAu3OEop+JnkyscZKe0mZpr2CoWHGM3RMGjanoKK8ZoDC SWmVYrVvV3u5n/uV6wi+is7Kt1J2QR8gHckA+h5G/HXD8c5CuGdg6yPGBAGxll5ryss1 mbsMHonThBsEbslB4dndMIe2RyDpjiXCHrnqY= MIME-Version: 1.0 Reply-To: eranian@gmail.com In-Reply-To: References: <4c76802d.aae9d80a.115d.70fe@mx.google.com> Date: Tue, 31 Aug 2010 10:03:33 +0200 Message-ID: Subject: Re: [tip:perf/urgent] perf_events: Fix time tracking for events with pid != -1 and cpu != -1 From: stephane eranian To: Lin Ming Cc: mingo@redhat.com, hpa@zytor.com, eranian@google.com, linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl, tglx@linutronix.de, mingo@elte.hu, linux-tip-commits@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 931 Lines: 33 On Tue, Aug 31, 2010 at 3:10 AM, Lin Ming wrote: >> >> perf_events: Fix time tracking for events with pid != -1 and cpu != -1 > > Hi, > > I thought pid != -1 and cpu != -1 is not valid. > This is in per-thread mode. This is what happens when you do perf record foo for instance. This is sampling, but you can do the same with counting. > # perf top -p 23268 -C 1 > WARNING: PID switch overriding CPU > > In which case this could be valid? > > Thanks, > Lin Ming > >> >> Per-thread events with a cpu filter, i.e., cpu != -1, were not >> reporting correct timings when the thread never ran on the >> monitored cpu. The time enabled was reported as a negative >> value. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/