Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10312912imu; Wed, 5 Dec 2018 21:34:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/Upz7jViYn0ocSUsDRulrmxydh1+vbt2/qyJT428bIoD1UYm6qJXV1JX9Q1VyM9uLCF73yd X-Received: by 2002:a17:902:3283:: with SMTP id z3mr27467897plb.76.1544074476325; Wed, 05 Dec 2018 21:34:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544074476; cv=none; d=google.com; s=arc-20160816; b=dLLK7yFhhvLXkEZMDKYsYpu+RYgAJWCU/pd+qLsXS9ce6SmbnE9HD/FrkEkLa4tN3i CDAZ+I28wUTu838yHdujmzZjYudk4bPf0N2dLqPm7mSvAp8S+XbM8BUiIoItFFyUtM2+ /3Ym/dAnzV/cQ/EfUTJosEuOsqzBLsN2HJXDDKXQ/4bEHNazdTyOZxXyrh19GPb8vRBw J0sAF3xLKeAKnxNHnOyuWZ6SDLVlfC8u65HMit0I0RH5TOF3B2EY5Yq9Jw6CE2cnqR+8 8GnHRD1LzI+VKJURFdRppDjl7Ppx39QTm+3pUhducl5Xwkvt726d5T9PVwGsn2L2ocOF 3Mkw== 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=K/0v5WsEOS95YHMihmb1ceT2OejWWg9+cldLrWV4ZHU=; b=uy42on49i4tuz/y2nTXJwMOeLvHSNfxNtQ5W54Qah4STBYqyUaN7DAv+PfQoQ7F409 rxDwtH0YbrMaAFiym/kS+B4NEUJ+7bJSoX32eLmuH2KgOH4X/FSwhMDQuCSqqFy4x+KO m8smxDXWilUEb0Min0RmbcuEyt8bva9eY31qmEDw93okYtHVEAjBQp7+mz5Y4y4BJdpb 0pwWhBFHekhBLInV4SbHbtOy8wutmL2b6g72EE5mlkF5YnwJ73ZicVvZ3nodRRlX1NSJ Z783ZjM6xFWf7y/drQEPv7uQX1pQQ6KJymz9rYpSe/GscxicbsB9QLptxmyARoCc6+nQ tflw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I34AoiPZ; 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 m198si19960513pga.98.2018.12.05.21.34.20; Wed, 05 Dec 2018 21:34:36 -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=I34AoiPZ; 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 S1728998AbeLFFdN (ORCPT + 99 others); Thu, 6 Dec 2018 00:33:13 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40656 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728294AbeLFFdN (ORCPT ); Thu, 6 Dec 2018 00:33:13 -0500 Received: by mail-wm1-f65.google.com with SMTP id q26so15052604wmf.5 for ; Wed, 05 Dec 2018 21:33:12 -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=K/0v5WsEOS95YHMihmb1ceT2OejWWg9+cldLrWV4ZHU=; b=I34AoiPZd47vges221fbfioEoynXNeS9nxQwaLH6gvIl51B+SDrBrD9yHIhnTQJrG1 kobyw78oQS4V66Otur0YRMnZxV81wySUV5iIQ8nJ4R3W39S1an+mY+P35FiFR3L2in8V gjJmxBOESxrK2FVLhKjhCeC5OTBqMYVdKJWTo= 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=K/0v5WsEOS95YHMihmb1ceT2OejWWg9+cldLrWV4ZHU=; b=RGQxCA4rhfWkcxM5VipE9uBY8u9Ki2QtXO4A3wPpAJYQajDnUZzYX5insR8KylZzxS rH1r1untup/er3h5iP/DipovEkp7hnySm/tinz+RUfthfs08njnLekoaGTT5EYk5FWwL 3R1FZvZqrAoNGNlYXKuCWwl4eZ7ebRmnah24GhELGSTfZgJ4OxDhjVfbJMQOlxSwq7UN 9OdssefQ07Tz3kdF52g41yTuDZY/W+F4vmdgHPJLO5bRLeGlncdDrhjGs+2L3whzxTJr 7UC0gGpAFcGEXeY+bR/lqRXjFTuMPOJXdIpTlWPyLlrjxvPF5TLncUkaNcfPV6vvNbsZ H53A== X-Gm-Message-State: AA+aEWbvO9XXGnu4B4pDqFEO3Ybhu39ChrUy2U2HbPdqgriee3uV7Hci UKnG6G+BDc2GUTImcFoEKn5TnA== X-Received: by 2002:a1c:c10f:: with SMTP id r15mr11818176wmf.27.1544074391720; Wed, 05 Dec 2018 21:33:11 -0800 (PST) Received: from leoy-ThinkPad-X240s ([209.250.228.18]) by smtp.gmail.com with ESMTPSA id j202sm20927950wmf.15.2018.12.05.21.33.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 21:33:10 -0800 (PST) Date: Thu, 6 Dec 2018 13:33:03 +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 , Andi Kleen , Adrian Hunter , Arnaldo Carvalho de Melo Subject: Re: [PATCH v2 1/2] perf cs-etm: Set branch instruction flags in packet Message-ID: <20181206053303.GA4244@leoy-ThinkPad-X240s> References: <1541912876-20967-1-git-send-email-leo.yan@linaro.org> <1541912876-20967-2-git-send-email-leo.yan@linaro.org> <20181119222617.GA5628@xps15> <20181205062550.GC15964@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 10:40:07AM -0700, Mathieu Poirier wrote: [...] > > > > static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer( > > > > const void *context, > > > > const ocsd_trc_index_t indx __maybe_unused, > > > > @@ -484,6 +650,8 @@ static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer( > > > > break; > > > > } > > > > > > > > + cs_etm_decoder__set_sample_flags(context, elem); > > > > + > > > > > > I was toying with the idea of setting the flags in each of the case statement > > > found in cs_etm_decoder__gen_trace_elem_printer(). But that would move more > > > code around and the end result would be the same so let's keep it that way until > > > we have a good reason to split it. > > > > Do you sugguest to keep current implementation rather than to > > split flags setting in each of the case statement in > > cs_etm_decoder__gen_trace_elem_printer()? > > > > I am not 100% sure if I understand correctly for "split it" (split flags > > setting vs split functions). So please correct me if I misunderstand > > this. > > I find function cs_etm_decoder__set_sample_flags() overly long. Since > the case statements in it are the same as the ones in > cs_etm_decoder__gen_trace_elem_printer() a different way to proceed > would be to do flag setting there rather than all in > cs_etm_decoder__set_sample_flags(). But that would introduce more > code modification and tighter coupling. Since I don't have another > alternative I am suggesting to keep the current implementation. Thanks for clarification.