Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp591617pxt; Fri, 6 Aug 2021 09:02:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4VdarluGotBoGYy1bd9Rcj7Fm41rLveOOaq27xe82dNYWikNP86aU7bTQVIW4WAp3+mNr X-Received: by 2002:a6b:6614:: with SMTP id a20mr333791ioc.142.1628265734339; Fri, 06 Aug 2021 09:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628265734; cv=none; d=google.com; s=arc-20160816; b=MAmJttHHMB/1gSZjPU8Ojj8mCQiALaihcmM1j5MmibNpvxt4GUSJNfgmYqC9X2evFm /TJBUPePxi7H/3SoHCUbiwTcGmlq7WN7XFK3W9oVYKhTgAMdEW4O69c/CCo/7G5N3cwZ kR7rTBV+Ywc18OLHzZc7inhvrEoV3UsKzwIegHqYphD6wNj84wx9DDg9oUG/MnLzyc2g F9ojRvXkFufAZgkyhd6MWGk/lDTpMP3Q6v0e6OGATdzAe6v1veiGV9vVh5zV83i4+Zyx D3GMaiIiLVkggMfJC6imNZPI0VVJkC+1FGimEc/inn9eZwpyIcLMnPpv6Qjs1K4rOaWy ACzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=asA0Ub0/xhYqLYHlNNxTcENpmvj49OeKJZ/JEYJFvM8=; b=UP+0WWMsRf+wvyjgOf7FS7uipHxqXQ4n5IWmJPW3gK3oiN6d0nZwKzKWE4iTENt2IW WXFItjlyrGZJV75DEZ/nsFdcLlN4wVOHti/hqq7mUfz9jofX9xl7QtgPFNoIbf9nCY/M U+7ARUQRLsgY1yqnK7jQ44mUg6ekiCq7nZx2LyITE2tfWaM4mgO3VHyfPoG6u6Zwlk4R cgxrOoOmDNXgZy3g5dnTBbTMSm3Zt59zmzRYygAAfV/YUGMDQoNqmPRC0qc9clISqTbJ F10YDsGMdRWocr4EtynBNvyzq9d0jBlthwn/O2quoiF3y/c/fBPM+Z74zs6dulwB3n+d rpjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q5BdQhFD; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p31si10363713jac.95.2021.08.06.09.02.01; Fri, 06 Aug 2021 09:02:14 -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=@linaro.org header.s=google header.b=q5BdQhFD; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245721AbhHFLwZ (ORCPT + 99 others); Fri, 6 Aug 2021 07:52:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231811AbhHFLwX (ORCPT ); Fri, 6 Aug 2021 07:52:23 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C86ADC061798 for ; Fri, 6 Aug 2021 04:52:07 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id u21-20020a17090a8915b02901782c36f543so13462268pjn.4 for ; Fri, 06 Aug 2021 04:52:07 -0700 (PDT) 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; bh=asA0Ub0/xhYqLYHlNNxTcENpmvj49OeKJZ/JEYJFvM8=; b=q5BdQhFDmEyv26B/H0n63ZK+Rh4G56toYP/AgcY0rIGb7YNTEBvTtlBbPPY4YL435M uDmaeNThxx82CNOVC7yCNskVuOWKS3thkxWhtt0IiCvcelIpuzCsT8sj5NOc+n9WR7Lu 28KhvZQBAG1VKQMS60AonYBFj9xUvAB3Z8q++0I+m7GqKQbNXq1dVkGgesNK4dXFk6Z1 UWH7VX9D1BW/mxSSR4XOn+d1UxnU1G3ubBwhx+RYlePTH9hToSc5MYgtp7eONJ07HNCA ODs124Bw3SnnGLPEg5o7LFkNzlIMD7wmC2iljqLroSya7nRCQ/Lmk8e3ta1QhBmxrst1 ypJw== 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; bh=asA0Ub0/xhYqLYHlNNxTcENpmvj49OeKJZ/JEYJFvM8=; b=Xf+RRZx9vcw+2p7BBWgzWz3q8ep+Avs7e/C65gyfkfb/r1pfq+X8geXL4eRWwn+jb6 lqBTZhECiE+wla9tqTA9g6ZveudkizrsC7XzcIoJ9ABWt2iSNfWgnPtRuhJNQBAlE5zc Mne2du2K9dIBU1VDS0OHg79AwD7ZWoenxul3pZ/7HT7Q9hgJt8R09ESCemZ5pnIc1MAl p1bHbXt0pOgguxljtD3QCOwRA0CGywslXeZZmjtNLAPl/bOpdH/wGSuuIyYqNZSbL2bJ COXM2P6oi+wfB93bmojEzn4R/eI4v6PcDoZNSIJ9+i40MOFBgow7u6e04dpeGDibJ+/b 0+Qw== X-Gm-Message-State: AOAM530t/9o8n0NjvrZcov99pOoUFzzwpsrOrnRkNxiiKH1F5h71EjIl CzWzxl+LET0/wUyID11Qrv+hwQ== X-Received: by 2002:a17:90a:404a:: with SMTP id k10mr10147405pjg.145.1628250727264; Fri, 06 Aug 2021 04:52:07 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([210.0.159.74]) by smtp.gmail.com with ESMTPSA id o8sm12735737pjh.20.2021.08.06.04.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Aug 2021 04:52:06 -0700 (PDT) Date: Fri, 6 Aug 2021 19:52:00 +0800 From: Leo Yan To: James Clark Cc: acme@kernel.org, mathieu.poirier@linaro.org, coresight@lists.linaro.org, al.grant@arm.com, suzuki.poulose@arm.com, anshuman.khandual@arm.com, mike.leach@linaro.org, John Garry , Will Deacon , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH 6/6] perf cs-etm: Print the decoder name Message-ID: <20210806115200.GD68808@leoy-ThinkPad-X240s> References: <20210721090706.21523-1-james.clark@arm.com> <20210721090706.21523-7-james.clark@arm.com> <20210731073037.GF7437@leoy-ThinkPad-X240s> <077ebe58-f692-9adb-9cb5-ed35a9b508c1@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <077ebe58-f692-9adb-9cb5-ed35a9b508c1@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 06, 2021 at 10:43:25AM +0100, James Clark wrote: > On 31/07/2021 08:30, Leo Yan wrote: > >> @@ -658,7 +658,7 @@ cs_etm_decoder__create_etm_decoder(struct cs_etm_decoder_params *d_params, > >> > >> return 0; > >> } else if (d_params->operation == CS_ETM_OPERATION_PRINT) { > >> - if (ocsd_dt_create_decoder(decoder->dcd_tree, decoder_name, > >> + if (ocsd_dt_create_decoder(decoder->dcd_tree, decoder->decoder_name, > >> OCSD_CREATE_FLG_PACKET_PROC, > >> trace_config, &csid)) > >> return -1; > >> @@ -790,3 +790,8 @@ void cs_etm_decoder__free(struct cs_etm_decoder *decoder) > >> decoder->dcd_tree = NULL; > >> free(decoder); > >> } > >> + > >> +const char *cs_etm_decoder__get_name(struct cs_etm_decoder *decoder) > >> +{ > >> + return decoder->decoder_name; > >> +} > > Maybe can consider to place this function into the header file with > > "static inline" specifier. > > I tried this, but because the struct is defined in the .c file it can't > be done without moving the struct to the header. It's also only used > for the --dump-raw-trace path so performance isn't critical anyway. It's fine to keep current patch, and thanks for trying.