Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4453658pxa; Mon, 10 Aug 2020 09:24:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWmFSyA3YC1o4a/u/co6GiggmRT4aIQaNXqf3YVKcYh9zJkW/WaDxTr0Hjb7Qk9DvBXV/p X-Received: by 2002:a50:9b12:: with SMTP id o18mr22124422edi.367.1597076651270; Mon, 10 Aug 2020 09:24:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597076651; cv=none; d=google.com; s=arc-20160816; b=rkJnT4OFz63lEvoCWOYMmMR7cXrNU3cHwq7Gojg7bKv89bmWfR2P1fFuW76FGEdBHN 5qEQ4qS4TvdclMFFC614QdULoafiiQpXnxMDI8SK5si79+dramt235WG6CuHaqkbXpzx EjQb27YgFCkgbynEW50bx9imQ4f3a1Qsg2IPoBRSmfAyzdeh/HZHb+kTt0lRXazuHQ4M uEfjSPbbCmC3iwKyCFiePQhJHCHT90keRk/7GGHQqckT03jUR1xck653O/G7fKJCasmP lGc+Nmx6z9iC2xR/PqO3irMlV06PwVIKrzZcBUDsl9uII6TJISZ2G6acNTHoVXtBsWME MHHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=OVBP+i4p/jdaCV4Z3hZMz83LNlOXWE6QsCpK7D+jEGg=; b=o0DQy61gTegeuBGnLySrnAIamEufegh0aMg258XKA2YxrPyMThNfWkpkQZIXsVELDT Sh8a19ZlF0TYu8FizwltDQj8CIpaWglvaOV7PBA4i7lbW1KrrO92/74U8uncjmmvWOjP gu9D6hF2AdtCKwcTbRpfdIghoYcprVuykXnkGOPUgrYa/PlIF4yOqBqxqPZ08Q9Jc/lL VEB8pWW8xol2M0NRn9RrD4EaAR29MWZ1ytUl8qu1lRuABeY/bnzXqVUntC3aES4leqwk iSxp5bTZL3RwbUXtMQSH+VGNK9t7xB/607TqRb7G7tDNhgVEdeTgC6JmiekWxFqxSzYs 7kEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pgQGCr8V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g21si9772275ejx.56.2020.08.10.09.23.47; Mon, 10 Aug 2020 09:24:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pgQGCr8V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727101AbgHJQWc (ORCPT + 99 others); Mon, 10 Aug 2020 12:22:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:53738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726338AbgHJQWc (ORCPT ); Mon, 10 Aug 2020 12:22:32 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D242E2083B; Mon, 10 Aug 2020 16:22:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597076551; bh=TMB+YPg30okjjFLgmu8bD6p0VeNkGsMlsaIVFAzVu38=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pgQGCr8VheKcxUlrfeeGOEkt0utWJcaORg7Ddn0uU3m5JhhvK61aEg7qamOMJRFJ9 aZ0hCdXk42gqATKTayVQkto0uHULpfFYSWqneqbwxB1Hu4uVan0ai4xyyJX/dJqSHw qQSeK/HcSsjZZmKvXG2gMLgRLC9QSz88kPQ02BcY= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id F04F4403C6; Mon, 10 Aug 2020 13:22:28 -0300 (-03) Date: Mon, 10 Aug 2020 13:22:28 -0300 From: Arnaldo Carvalho de Melo To: David Ahern Cc: David Ahern , namhyung@kernel.org, linux-kernel@vger.kernel.org, jolsa@kernel.org Subject: Re: [PATCH 1/2] perf sched: Prefer sched_waking event when it exists Message-ID: <20200810162228.GB4527@kernel.org> References: <20200807164844.44870-1-dsahern@kernel.org> <20200807194335.GF2456573@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Aug 07, 2020 at 01:50:47PM -0600, David Ahern escreveu: > On 8/7/20 1:43 PM, Arnaldo Carvalho de Melo wrote: > >> @@ -2958,9 +2967,10 @@ static int timehist_check_attr(struct perf_sched *sched, > >> > >> static int perf_sched__timehist(struct perf_sched *sched) > >> { > >> - const struct evsel_str_handler handlers[] = { > >> + struct evsel_str_handler handlers[] = { > >> { "sched:sched_switch", timehist_sched_switch_event, }, > >> { "sched:sched_wakeup", timehist_sched_wakeup_event, }, > >> + { "sched:sched_waking", timehist_sched_wakeup_event, }, > >> { "sched:sched_wakeup_new", timehist_sched_wakeup_event, }, > >> }; > >> const struct evsel_str_handler migrate_handlers[] = { > >> @@ -3018,6 +3028,11 @@ static int perf_sched__timehist(struct perf_sched *sched) > >> > >> setup_pager(); > >> > >> + /* prefer sched_waking if it is captured */ > >> + if (perf_evlist__find_tracepoint_by_name(session->evlist, > >> + "sched:sched_waking")) > >> + handlers[1].handler = timehist_sched_wakeup_ignore; > >> + > > > > > > ouch, can't we figure out if its present and then don't ask for the > > wakeup one to be recorded? > > > > This is the analysis side. If someone recorded with sched:* we do not > want to analyze both sched_wakeup and sched_waking. Rather, it should > prefer the latter and ignore the former. Right you are, thans for the explanation, I should've noticed that :) - Arnaldoi