Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2503153pxb; Mon, 19 Apr 2021 07:15:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBkwgvnXMH/qUG+oizVCvCgCEpvx7e5XzB2ItLuQvFOkuAuDvzILkt4vrA/8Lx8f9oPuLY X-Received: by 2002:a17:906:6801:: with SMTP id k1mr7957117ejr.137.1618841757564; Mon, 19 Apr 2021 07:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618841757; cv=none; d=google.com; s=arc-20160816; b=rbzJbst+i5P8a9DFxUtzbhUere7BKbvd/QagocXmnIM1RNQTfZSEgurHG1LdC01+xq ogMQqluRZKhHM9mgq5AeNFfpWS0PdVoTIKMRk+sAjlXM4FC2UJMS9xQlapkXBpmrlChT UJwU60OqdaJSWib8VcicxwNKB/hX2+kFKlQKwmI9TIS6jPJFQesbEvLw+xYNHbN5Riv7 dIBhMWYQ08wiYkrF0tne9RoqESVvBloalNYURED9UnmGfBBOFAinoIZYJGUm9G8ZwFaw m05MWDgHKttHan+RXfIdcbCalO0VRPgVK6Twe1xbF/G57Z/s2XvgG/Y6T6zVoSm04b79 NNVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=eYBTl3kgzy1rbvZSw1eOziwMQ0Wg2qLerYbB5xhnnkU=; b=qgm7XGvXaQYkQZc8wuEfQ6Eztiz8V7DMQLhP5OdYIs0nszZkKZr19WZ10bCYyvTEJ/ tIBbo3pvQF4La28W1igNv2wkNbSuH0tsl1+I9bpGUCFuqAj/IvccU5svl9wg0p5sGXKw QMt6ERxsb8PpPnij46ZIVFVY9GbKTg2KPQmTjCehdigvGmvEMgGw54ne7rKsxiqdMqkd ae5WI2AwXN9Qz3v9jPDB5vZnO8mleliPCzn0JMxQe44s2y4qhHl8EdglKzSwvJqeYNE4 cWQPngnrVo5/JoVfq+dMv3YN39KvG6USOSSg1YnLMiDHogqWxISqK8WfRR01ZT3rfOID c1tA== 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=hisilicon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si13612827edr.409.2021.04.19.07.15.29; Mon, 19 Apr 2021 07:15:57 -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=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232816AbhDSNEv (ORCPT + 99 others); Mon, 19 Apr 2021 09:04:51 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:17361 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238300AbhDSND5 (ORCPT ); Mon, 19 Apr 2021 09:03:57 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FP6Pq1J0Sz7vwK; Mon, 19 Apr 2021 21:01:03 +0800 (CST) Received: from [127.0.0.1] (10.69.38.196) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Mon, 19 Apr 2021 21:03:18 +0800 Subject: Re: [PATCH RESEND 0/4] Add support for HiSilicon PCIe Tune and Trace device To: Alexander Shishkin , , , , CC: , , , , , , , , , , , , , , , References: <1618654631-42454-1-git-send-email-yangyicong@hisilicon.com> <8735vpf20c.fsf@ashishki-desk.ger.corp.intel.com> From: Yicong Yang Message-ID: <628f2f4a-03ce-a646-bf27-d6836baca425@hisilicon.com> Date: Mon, 19 Apr 2021 21:03:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <8735vpf20c.fsf@ashishki-desk.ger.corp.intel.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.69.38.196] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/4/17 21:56, Alexander Shishkin wrote: > Yicong Yang writes: > >> The reason for not using perf is because there is no current support >> for uncore tracing in the perf facilities. > > Not unless you count > > $ perf list|grep -ic uncore > 77 > these are uncore events probably do not support sampling. I tried on x86: # ./perf record -e uncore_imc_0/cas_count_read/ Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (uncore_imc_0/cas_count_read/). /bin/dmesg | grep -i perf may provide additional information. For HiSilicon uncore PMUs, we don't support uncore sampling: 'The current driver does not support sampling. So "perf record" is unsupported. ' [1] and also in another PMU: 'PMU doesn't support process specific events and cannot be used in sampling mode.' [2] [1] Documentation/admin-guide/perf/hisi-pmu.rst [2] Documentation/admin-guide/perf/arm_dsu_pmu.rst >> We have our own format >> of data and don't need perf doing the parsing. > > Perf has AUX buffers, which are used for all kinds of own formats. > ok. we thought perf will break the data format but AUX buffers seems won't. do we need to add full support for tracing as well as parsing or it's ok for not parsing it through perf? >> A similar approach for implementing this function is ETM, which use >> sysfs for configuring and a character device for dumping data. > > And also perf. One reason ETM has a sysfs interface is because the > driver predates perf's AUX buffers. Can't say if it's the only > reason. I'm assuming you're talking about Coresight ETM. > got it. thanks. >> Greg has some comments on our implementation and doesn't advocate >> to build driver on debugfs [1]. So I resend this series to >> collect more feedbacks on the implementation of this driver. >> >> Hi perf and ETM related experts, is it suggested to adapt this driver >> to perf? Or is the debugfs approach acceptable? Otherwise use > > Aside from the above, I don't think the use of debugfs for kernel ABIs > is ever encouraged. > ok. thanks for the suggestions. Regards, Yicong > Regards, > -- > Ale > > . >