Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10322274imu; Wed, 5 Dec 2018 21:50:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/XW87v19ADvJF71AXaJ96nGBfVW/n4jIPrW246Kh0RSrdhOf7KB/vobfnWvL2JboY+OM35g X-Received: by 2002:a62:2f06:: with SMTP id v6mr27681335pfv.216.1544075446984; Wed, 05 Dec 2018 21:50:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544075446; cv=none; d=google.com; s=arc-20160816; b=0hGAtb1slvJsugc3jOyBFb5gjVBZNDoILFVqcS8peq3qBXUyPNsuOi3XWE1AkQf/u7 K09mk0l4L9B33HjHA0hi/FUcpxIxOScEzqDerps3O5pO879cS1SlEV/vUHTdlqrlyEi3 XfSg3FUn4W2tcURxNlLF4bzOj8l9vbdB70aBHGGkjJkWFJgPSu72r14IXcrr20y+h2F6 Fq0Ef9rKd74Z5F/UD9tZLRt5KXgDfrStstLztChsYVZdZFdtovgOFg0+nofZWvRa8Azy rFZN6cCfuVeqS9a9AHNpVhMJl8/F137aa+4qGacY7YMCmEeYfUS0MTmN0OREOtyh+kTi ZlvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=r/LCm/PIII5ixONfxT5d8IeI+92VrPuxYpOqN8TpFlY=; b=ziuiJasgGU8Dh5w0iUNX6y/xzaeyzjpt9dCAACr10pIgDfdpGUlvsCkfMtdUsXyh6H fEFZ3ldF3HZsVRlDtggLP2ftkL2k+dvK/YrRLTzu72mpwGtnGuZy+gPrNFXqLUWgCz1R 40bxfDva4YiGEJDQWF0BUa5S7DYugUNtTEJI5CIZu9yzWJdxr47zyNZdzdpkNJ2fiGxs O9FRneFBLDPr9dXajFmyPor7pu48+G+G6R7gz6fJOwxRy7nKV31KoSn1HcrxuvGTuoSe LRAwSTmEkBgtWpHYmtW5eRM8+zbltFvDVxLtzTvhMRGELkIknDhodYRnK3GxH0O2gy5T KAuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OT5slp1J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m76si21554861pfj.48.2018.12.05.21.50.30; Wed, 05 Dec 2018 21:50:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OT5slp1J; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729050AbeLFFrr (ORCPT + 99 others); Thu, 6 Dec 2018 00:47:47 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53724 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728294AbeLFFrq (ORCPT ); Thu, 6 Dec 2018 00:47:46 -0500 Received: by mail-wm1-f66.google.com with SMTP id y1so15441211wmi.3 for ; Wed, 05 Dec 2018 21:47:45 -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=r/LCm/PIII5ixONfxT5d8IeI+92VrPuxYpOqN8TpFlY=; b=OT5slp1JSIQiMzeuLnOdPnVBwWYnXEeq8rMeHECnXYR5GtfxycpFt9uOXeEinrksL4 AQ/nW+RiXoSXy2S6yU/PyKdZsZmX30UUZX1UJy4AdnLruCFxS2n7z8s9PwXL/JJIJwxY Xn4c5PhjytNVX2kGuPPhL7LNAfoRfqKVtSmT8= 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=r/LCm/PIII5ixONfxT5d8IeI+92VrPuxYpOqN8TpFlY=; b=ZOIjjJQCPJP1Sx9oGHAxuLVg/aWCunu5qOTaaPdS1UeHxUu9hoLOXM0ATzbBwteG97 193HzR2ewEYxl7Ym7+iNVyKYIO5QUz0NuBbHzh20CNkPt+NZKuC2b12lKkYy8OXtHcBe OYHvJnRE1Nttx6H3wkIpYxmTAk1eoHKtuIRhiaVqKUoWbWOy6ktziwsftF7BO/rF1VDX OkdTZCcCTIFj6s+KQd4qqNq0JR1GynQd7IoOEyJAB28ZVPI8m5eAbvg4xR1CIC+HM2y8 Bf3zQYUq+Yt8qc3h9g8aYtqGPxEP6BJqALKrpBf/+w9yJFH23b8XNJ2k5PImmWzZBwAc i/hQ== X-Gm-Message-State: AA+aEWZeTpegPgcBU7gvEjBJqrKSI6FTAwAn9AZciHuqAD8jXB5TXQnB SZnnsrT0VSrZKTYOii7RnFaTQQ== X-Received: by 2002:a1c:8484:: with SMTP id g126mr19097697wmd.117.1544075265108; Wed, 05 Dec 2018 21:47:45 -0800 (PST) Received: from leoy-ThinkPad-X240s ([209.250.228.18]) by smtp.gmail.com with ESMTPSA id m15sm15746598wrr.95.2018.12.05.21.47.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 21:47:44 -0800 (PST) Date: Thu, 6 Dec 2018 13:47:38 +0800 From: leo.yan@linaro.org To: Mathieu Poirier Cc: Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel , Linux Kernel Mailing List , Mike Leach , Robert Walker , Al Grant , Coresight ML Subject: Re: [PATCH v1 5/5] perf cs-etm: Track exception number Message-ID: <20181206054738.GC4244@leoy-ThinkPad-X240s> References: <1541912383-19915-1-git-send-email-leo.yan@linaro.org> <1541912383-19915-6-git-send-email-leo.yan@linaro.org> <20181119204749.GB608@xps15> <20181205034950.GB15964@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10+31 (9cdd884) (2018-06-19) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 05, 2018 at 11:03:29AM -0700, Mathieu Poirier wrote: [...] > > > > static ocsd_datapath_resp_t > > > > cs_etm_decoder__buffer_exception(struct cs_etm_decoder *decoder, > > > > + const ocsd_generic_trace_elem *elem, > > > > const uint8_t trace_chan_id) > > > > { > > > > - return cs_etm_decoder__buffer_packet(decoder, trace_chan_id, > > > > - CS_ETM_EXCEPTION); > > > > + int ret; > > > > + struct cs_etm_packet *packet; > > > > + > > > > + ret = cs_etm_decoder__buffer_packet(decoder, trace_chan_id, > > > > + CS_ETM_EXCEPTION); > > > > + if (ret != OCSD_RESP_CONT && ret != OCSD_RESP_WAIT) > > > > + return ret; > > > > + > > > > + packet = &decoder->packet_buffer[decoder->tail]; > > > > + > > > > + /* > > > > + * Exception number is recorded per CPU and later can be used > > > > + * for exception return instruction analysis. > > > > + */ > > > > + decoder->exc_num[packet->cpu] = elem->exception_number; > > > > > > Am I missing something or the information about the exception number that is > > > recorded here isn't used anywhere? > > > > The exception number will be used to set branch flag patch [1]. > > Right, I realised that when I started reviewing that set. The rule of > thumb here is to introduce code in the same patchset it is used so > that we avoid adding needless code to the kernel. Will move this patch into sample flag series. Thanks, Leo Yan