Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp314782pxt; Fri, 6 Aug 2021 02:44:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlt5OXBDpsoNPxPIKhu17Or5UYzM88Ko67aOMlkAbfbUqXNZXo41pM10jpK+Jni4EV7NgB X-Received: by 2002:a02:664e:: with SMTP id l14mr8879701jaf.56.1628243094188; Fri, 06 Aug 2021 02:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628243094; cv=none; d=google.com; s=arc-20160816; b=MQUb7M79KvfGz5UCQ/WAQKxJhdEoIJ3Aor+mS740Y0cYpGt1YJ6k2/YA4a/6tb/Zwd ILyXTf8O8d0gMnhU5A2OdAOiBy+VYc+9M+CWjvJ/eu3RrWI2n8Uiv+SJ5TbfLFDDsm7a tj/K5AjclsDx6Ei7FtfiQ4w+0Tga2BgadvBMclwATYmpOlPXF/ntnDR8kKAW7hKEZxqn 3Nd7hZh4WdnyJPmAUELK+tSR5ZGI0V/Idd4kV8HMIN9QuwPjMqj+R/1w7nJopgd//1JB fx8jVjZ5Jj/ThtO4X63VmRfDVLJbtirn3R7G7/bd04nc15YMlX4lY+uoOq06dc+s6QDs 8cww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=LCudikl0PkkV72BNw2CuZI5xDEsOtZp6/22Tl03wEL0=; b=dz4JdPHY2FmodmMXop5HBAHzgzNHK3pY4bBcT82Twg/By5ty94sFyzSGOt6MBXnQtb hpi8qPgBFLPF8rMhcmrLUAVSV3WiRgoJSdNoxYHka7uKYKiGGhy2PbI9Y14GaDonEILI AOtRKtNpQ85CZd/q8z3rOJInB8R9awo+yRqCqxCfXa17vBN/9S58xCAmjApf4Es3NCUG u01AHn/n7HBJj4jeqoDqyCE1rHbuow4zgDgN4644STmKzy2zo6uFYQeNndmwus6WXCQX attsRk79cJFCu/jixItbOdGR1ZhABJbDnQv2lPWnAHzX2Fads7C70GIKqHdsSO4YtL4L YNQQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x5si8663208ilq.85.2021.08.06.02.44.42; Fri, 06 Aug 2021 02:44:54 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244662AbhHFJnp (ORCPT + 99 others); Fri, 6 Aug 2021 05:43:45 -0400 Received: from foss.arm.com ([217.140.110.172]:56838 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242680AbhHFJnp (ORCPT ); Fri, 6 Aug 2021 05:43:45 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7D52F31B; Fri, 6 Aug 2021 02:43:29 -0700 (PDT) Received: from [10.57.40.41] (unknown [10.57.40.41]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 38AA43F719; Fri, 6 Aug 2021 02:43:27 -0700 (PDT) Subject: Re: [PATCH 6/6] perf cs-etm: Print the decoder name To: Leo Yan 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 References: <20210721090706.21523-1-james.clark@arm.com> <20210721090706.21523-7-james.clark@arm.com> <20210731073037.GF7437@leoy-ThinkPad-X240s> From: James Clark Message-ID: <077ebe58-f692-9adb-9cb5-ed35a9b508c1@arm.com> Date: Fri, 6 Aug 2021 10:43:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210731073037.GF7437@leoy-ThinkPad-X240s> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. James > > Either way, this patch looks good to me: > > Reviewed-by: Leo Yan >