From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6406C00A89 for ; Mon, 2 Nov 2020 10:08:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39D2B22275 for ; Mon, 2 Nov 2020 10:08:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="NNXYQiVn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728399AbgKBKIf (ORCPT ); Mon, 2 Nov 2020 05:08:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728183AbgKBKIe (ORCPT ); Mon, 2 Nov 2020 05:08:34 -0500 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E0FEC0617A6 for ; Mon, 2 Nov 2020 02:08:34 -0800 (PST) Received: by mail-pg1-x544.google.com with SMTP id k9so8672261pgt.9 for ; Mon, 02 Nov 2020 02:08:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/oNsh0ZZANxB+0DY/V3HzKuZqq+yTNfopsDbZ8CmqMY=; b=NNXYQiVnBj7e6N99x/I7VSQ9R0te6wFkmJ4X6uswDTHA4n2nJUhaDn2+sy7Swaz4ie Y8swEXn99HFOV4AUecW9zDU+6iP0MC6F3eoICr26QBNzfm3vMYDUxvt4llKrmK0x5OKo YwRL1FFWbN/XdSgz/U6HafHOKdyRHU5u1T3Orcw4fTo1oMKoe2lNd2e7SWX7CV8hXid6 Wz2HjYwO3skk1QFrC1uSZcSIW6HQ/h6rQ+cXyEo2XdZVaBXGIZfuGzw+8uC6JO9GdZ5U po0iOsiykEcAYCkBVKCabvKe2EUd+vi0uM9FHCN/KrUt7gJGyRfBukxcDP5AXM0ycwT7 r0+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/oNsh0ZZANxB+0DY/V3HzKuZqq+yTNfopsDbZ8CmqMY=; b=MNWzk+Us+UPlD6EghW9XEDuvRLCpZki8ouKMxMvV9VquK1KW+afsQHNJ9uewgkh5J2 RViz3fVBriem6CYEPbexduucO3tIhQNFTar83PwqtIgjAikPqcvxAt0qw1OCS4nmt/GP NA7VKsXPzyGHnDSDSb89uh7WdwUb/CukKA1TUYdG8tHHjr4EDn0KiaODQelhYufnipjZ RY0nE3dexblF1NfPY/b92GbtLTXHysArtL32S06JCzytDl0w27Z9JPsUSLUtMOZVEHT+ hvRxILCI2AHOlmSvwyAr99I3UMnNYuzpObH6tqjGrbA7ognN7nb6AQ5MN8SFlvQAB3tX 4sZg== X-Gm-Message-State: AOAM530aF8pjIzuFHyKK95Ryptp3SkcxBmk0fSkILTVVo3r/PFsq1OKD HdKeuxv9HNrzPup8Cy4JYxAiWA== X-Google-Smtp-Source: ABdhPJwpIEd4gQSbrsYHd8Mcy98MlIFLJwlPm1d8Be2RKs85mIe28v/7DCY+263yA3WlkcmZNYlSfA== X-Received: by 2002:a17:90a:b383:: with SMTP id e3mr16489578pjr.61.1604311714137; Mon, 02 Nov 2020 02:08:34 -0800 (PST) Received: from leoy-ThinkPad-X240s ([103.141.182.112]) by smtp.gmail.com with ESMTPSA id j20sm1332862pgk.59.2020.11.02.02.08.27 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Nov 2020 02:08:33 -0800 (PST) Date: Mon, 2 Nov 2020 18:08:23 +0800 From: Leo Yan To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Namhyung Kim , John Garry , Will Deacon , Mathieu Poirier , Kemeng Shi , "Naveen N. Rao" , Ian Rogers , Al Grant , James Clark , Wei Li , =?iso-8859-1?Q?Andr=E9?= Przywara , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 6/9] perf c2c: Support AUX trace Message-ID: <20201102100823.GB6633@leoy-ThinkPad-X240s> References: <20201028063813.8562-1-leo.yan@linaro.org> <20201028063813.8562-7-leo.yan@linaro.org> <20201031202103.GA3380099@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201031202103.GA3380099@krava> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiri, On Sat, Oct 31, 2020 at 09:21:03PM +0100, Jiri Olsa wrote: > On Wed, Oct 28, 2020 at 02:38:10PM +0800, Leo Yan wrote: > > This patches adds the AUX callbacks in session structure, so support > > AUX trace for "perf c2c" tool. > > > > Signed-off-by: Leo Yan > > --- > > tools/perf/builtin-c2c.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c > > index 4d1a08e38233..24f4af997aab 100644 > > --- a/tools/perf/builtin-c2c.c > > +++ b/tools/perf/builtin-c2c.c > > @@ -369,6 +369,10 @@ static struct perf_c2c c2c = { > > .exit = perf_event__process_exit, > > .fork = perf_event__process_fork, > > .lost = perf_event__process_lost, > > + .attr = perf_event__process_attr, > > + .auxtrace_info = perf_event__process_auxtrace_info, > > + .auxtrace = perf_event__process_auxtrace, > > + .auxtrace_error = perf_event__process_auxtrace_error, > > so this will process aux data, but don't you have to > say which events you want to synthesize? > > like in script/report via --itrace option? Indeed, we need to assign "session->itrace_synth_opts", otherwise, the tool cannot output synthesized samples. I tried to keep this patch set as small as possible, for easier reviewing. Comparing to the previous patch set, I moved out the patch "perf auxtrace: Add option '-M' for memory events" [1] from this patch set, at the end my purpose is to introduce the itrace option '-M' to synthesize memory event; and "perf c2c" tool can use memory event for output result. Thus "perf c2c" needs to add itrace_synth_opts: struct itrace_synth_opts itrace_synth_opts = { .set = true, .mem = true, /* Memory samples */ .default_no_sample = true, }; > aybe arm differs from x86 in this, and it's happening > in the background.. I have no idea ;-) There should have no any difference between archs for 'itrace' behaviour. Since I moved the patch "perf auxtrace: Add option '-M' for memory events" out from this patch set, thus I also left out the code for adding itrace_synth_opts. This introduced confusion for reviewing the change (sorry!), I will add back the patch "perf auxtrace: Add option '-M' for memory events" and add itrace_synth_opts for perf mem/c2c in next patch set. Thanks, Leo [1] https://lore.kernel.org/patchwork/patch/1298072/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5827EC00A89 for ; Mon, 2 Nov 2020 10:10:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D85A12225E for ; Mon, 2 Nov 2020 10:10:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pUjkZedm"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="NNXYQiVn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D85A12225E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=X0D2Cxu2vBqjwBDQ1VQ1wcZCLwhMpO2rvchtzDBSRVo=; b=pUjkZedmMhDmVOPXkykdg+hPl RwJLmHM0vkfEEBBwe+6FOw6Xd7jCLSN6RlnbzXHJ0nhKLCih/1VdwjHjXydflDK67cLuZkLSBh5Wc NBEQZvMOrNAxp67cX8DXT9GkIZYtR7JuOU7t1Xu/uYJAsLJg0vZsEIjM/Se7EIFKosCckyYam0H9K W5cTrz707Q+0m1m4yXg3scpnXetIEuc3pxUHaVf4UzuFnVOoNE23cB9juAgFHrh/RL6Flrg7ZWALK jiKskKoIYHDgfgs6Rm34R/QRRZ7eFi8sML3VgyjqxE8yhL7GnS44C8RMHOV0BVXqbXP1GlsYr3DhS pcHzg3A2g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZWlW-00066C-Ou; Mon, 02 Nov 2020 10:08:42 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZWlQ-00062d-Ea for linux-arm-kernel@lists.infradead.org; Mon, 02 Nov 2020 10:08:38 +0000 Received: by mail-pg1-x541.google.com with SMTP id 62so3082887pgg.12 for ; Mon, 02 Nov 2020 02:08:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/oNsh0ZZANxB+0DY/V3HzKuZqq+yTNfopsDbZ8CmqMY=; b=NNXYQiVnBj7e6N99x/I7VSQ9R0te6wFkmJ4X6uswDTHA4n2nJUhaDn2+sy7Swaz4ie Y8swEXn99HFOV4AUecW9zDU+6iP0MC6F3eoICr26QBNzfm3vMYDUxvt4llKrmK0x5OKo YwRL1FFWbN/XdSgz/U6HafHOKdyRHU5u1T3Orcw4fTo1oMKoe2lNd2e7SWX7CV8hXid6 Wz2HjYwO3skk1QFrC1uSZcSIW6HQ/h6rQ+cXyEo2XdZVaBXGIZfuGzw+8uC6JO9GdZ5U po0iOsiykEcAYCkBVKCabvKe2EUd+vi0uM9FHCN/KrUt7gJGyRfBukxcDP5AXM0ycwT7 r0+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/oNsh0ZZANxB+0DY/V3HzKuZqq+yTNfopsDbZ8CmqMY=; b=qjCdr46tVM1ocoVUMrSXTtGkzrYqZ+liBh5oQqyEoTEeafPR8Qc4+F5RXGWtI6d97G BCn1xqXrH+TDtn0wDlZUQiKeXv3pcV8WaAnyjnCAlvGpFcmc5WP3JaUtjjBBTu1bxOCU Lc6sjGYk3gS9nZgQ27OJV9JYnjhXsUNbSrEbROMHHp4Kar8ZVl2t7ixBAdfMMSwLoZsm vbquY5uPBPKZrE8HCuwW/idYql1dBPnU1974x7Cubep1pN3Z8X0g8I8TPNW/qy9UU2tb GGW7UFsFXcYceRtYW/SrCb2XYYmJ2AunyjO2iiaZty0t+gdLvfxmUV/ap3PnQyNdwqDl R6yQ== X-Gm-Message-State: AOAM531r9YS25l2FBQ9AVNJMRcfwNTv8G4vKr4BJzrunMrEKC+Z2RVfX ah1X+EDuADKi4wQwwgAOTuz0sA== X-Google-Smtp-Source: ABdhPJwpIEd4gQSbrsYHd8Mcy98MlIFLJwlPm1d8Be2RKs85mIe28v/7DCY+263yA3WlkcmZNYlSfA== X-Received: by 2002:a17:90a:b383:: with SMTP id e3mr16489578pjr.61.1604311714137; Mon, 02 Nov 2020 02:08:34 -0800 (PST) Received: from leoy-ThinkPad-X240s ([103.141.182.112]) by smtp.gmail.com with ESMTPSA id j20sm1332862pgk.59.2020.11.02.02.08.27 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Nov 2020 02:08:33 -0800 (PST) Date: Mon, 2 Nov 2020 18:08:23 +0800 From: Leo Yan To: Jiri Olsa Subject: Re: [PATCH v3 6/9] perf c2c: Support AUX trace Message-ID: <20201102100823.GB6633@leoy-ThinkPad-X240s> References: <20201028063813.8562-1-leo.yan@linaro.org> <20201028063813.8562-7-leo.yan@linaro.org> <20201031202103.GA3380099@krava> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201031202103.GA3380099@krava> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201102_050836_616480_3A294A47 X-CRM114-Status: GOOD ( 26.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Ian Rogers , Al Grant , Mathieu Poirier , Kemeng Shi , Peter Zijlstra , Wei Li , John Garry , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Alexander Shishkin , Ingo Molnar , James Clark , =?iso-8859-1?Q?Andr=E9?= Przywara , Namhyung Kim , "Naveen N. Rao" , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Jiri, On Sat, Oct 31, 2020 at 09:21:03PM +0100, Jiri Olsa wrote: > On Wed, Oct 28, 2020 at 02:38:10PM +0800, Leo Yan wrote: > > This patches adds the AUX callbacks in session structure, so support > > AUX trace for "perf c2c" tool. > > > > Signed-off-by: Leo Yan > > --- > > tools/perf/builtin-c2c.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c > > index 4d1a08e38233..24f4af997aab 100644 > > --- a/tools/perf/builtin-c2c.c > > +++ b/tools/perf/builtin-c2c.c > > @@ -369,6 +369,10 @@ static struct perf_c2c c2c = { > > .exit = perf_event__process_exit, > > .fork = perf_event__process_fork, > > .lost = perf_event__process_lost, > > + .attr = perf_event__process_attr, > > + .auxtrace_info = perf_event__process_auxtrace_info, > > + .auxtrace = perf_event__process_auxtrace, > > + .auxtrace_error = perf_event__process_auxtrace_error, > > so this will process aux data, but don't you have to > say which events you want to synthesize? > > like in script/report via --itrace option? Indeed, we need to assign "session->itrace_synth_opts", otherwise, the tool cannot output synthesized samples. I tried to keep this patch set as small as possible, for easier reviewing. Comparing to the previous patch set, I moved out the patch "perf auxtrace: Add option '-M' for memory events" [1] from this patch set, at the end my purpose is to introduce the itrace option '-M' to synthesize memory event; and "perf c2c" tool can use memory event for output result. Thus "perf c2c" needs to add itrace_synth_opts: struct itrace_synth_opts itrace_synth_opts = { .set = true, .mem = true, /* Memory samples */ .default_no_sample = true, }; > aybe arm differs from x86 in this, and it's happening > in the background.. I have no idea ;-) There should have no any difference between archs for 'itrace' behaviour. Since I moved the patch "perf auxtrace: Add option '-M' for memory events" out from this patch set, thus I also left out the code for adding itrace_synth_opts. This introduced confusion for reviewing the change (sorry!), I will add back the patch "perf auxtrace: Add option '-M' for memory events" and add itrace_synth_opts for perf mem/c2c in next patch set. Thanks, Leo [1] https://lore.kernel.org/patchwork/patch/1298072/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel