From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B18D6C433F5 for ; Tue, 21 Sep 2021 17:52:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7574661100 for ; Tue, 21 Sep 2021 17:52:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7574661100 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nPxdmITDHf0wHj3sLp0cuMqN5NR8u9bQ1GhwbdIY8WY=; b=nSnm/NzPmuoYi5 nhElfjBus/rrqGvpw3f60LgVDT3N1n1V+O8APVrxvISYtED0RarnT8fhi0YOCLYDvjYofY4zgbtv3 4VNLl+XoXQP2XhRlsnUi16nJaPMXIJJzaJl25Of8QwqAt8BM+Ty2KvAgfb6D6erWFUYgB64ZivNF+ ZRjwYytpm1+Qf+rWtNJHvtMCgcsEJdzWtPgXSwPomAJ8w7uLtrtjm1jUD0rLHRNPilKRo64S7W3Uk aMrZosUCayBC70cPbsA2uCNvVMCBisvt6HfI1k7eKZfZYVoV5J/6Wj+0KAu1uKbt6VrVMjbks8dVJ KFdqNtSW8Z3hNlSCxd5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSjuS-005OiI-C7; Tue, 21 Sep 2021 17:50:24 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSjuN-005OhA-I6 for linux-arm-kernel@lists.infradead.org; Tue, 21 Sep 2021 17:50:21 +0000 Received: by mail-pj1-x1030.google.com with SMTP id z14-20020a17090a8b8e00b0019cc29ceef1so2562859pjn.1 for ; Tue, 21 Sep 2021 10:50:18 -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=BUGGJA3ytxy64w6WHezVPeXCgJM9T1l9k/RSzTXwsCo=; b=UYysuVw/lWULU6hMLU9mDGdHLEskK+UVAOUEM3yl7BVmMXGcUG1VZiS5pwG6CILVU7 QM/LiLC1Yb0egkKcIVA1XHeRTnSHFNAV+fFtM1qVHDBRbmnFCmYs2hOS8AguaFOG08vg MJPzfnXhcwCcp2bULq8Bpx3zwLqYNzEbDZCZAuz/DzaHxBgOMDdkkeGhikUKxMHj8yum fiEU7IOuBffWVTvboxXhaSw6VzR2mD5bolYO6al8XcuOZvSbnV2Kz1HWp4bBxfjAjLEM NRFsAKRHzQn8c2WRGG8CGt0JZRZE6k7OS7i1Sb0GRQIxOm7qVW6kEAoyYPfsCxj+2WrL 1rIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BUGGJA3ytxy64w6WHezVPeXCgJM9T1l9k/RSzTXwsCo=; b=XnFhzaW7TXBxmiEs6HDcibY8gPWE93pnXuBOhxa4/cYvT55HZVwdG7hCJsE7TbInR4 V9B7Ea688KGO6NvW2vhal+vTmeA5rPEl3pm2Y9kuHQJUXjLjdhTUw/9SAXX6ffWojUPm rI66lVAo0K08z+XekbhtfaN+IiaSpCJBEJhXR7yfFvsN5Xj/CD49bjLdwRlnjINtE3V9 APU7wTqqYeLYb8B0JUNDKE0CAn6u26s/JYqKrv6PfNi6q2Qb5wCuAGsaQqQF/6+J2MPg 72EYXEAl21CPfZBJuNu8fcawW4wn8uqB9B24+s+PkUJS4td/wwJ4DI7sC2D8ekkck5UV +2uw== X-Gm-Message-State: AOAM5331PvkDcFLhCduErx+wWvtXrTQbPaexhDjwsYmnwI1q9P7US/le Ql0K52tXRiqqyhsywhA0Lw+Mug== X-Google-Smtp-Source: ABdhPJxGH6SDDLGuAbeFTJgE5p7oEhqZ0ogu86JRwkOaUEXYGWqYjDsqzOOicnLIxnS12sAfoVHooA== X-Received: by 2002:a17:90a:b794:: with SMTP id m20mr6797883pjr.178.1632246618403; Tue, 21 Sep 2021 10:50:18 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id w15sm6220279pfn.12.2021.09.21.10.50.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Sep 2021 10:50:17 -0700 (PDT) Date: Tue, 21 Sep 2021 11:50:15 -0600 From: Mathieu Poirier To: Suzuki K Poulose Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, anshuman.khandual@arm.com, mike.leach@linaro.org, leo.yan@linaro.org, tamas.zsoldos@arm.com, jinlmao@qti.qualcomm.com, al.grant@arm.com, denik@google.com, James Clark Subject: Re: [PATCH v3 07/10] coresight: trbe: Do not truncate buffer on IRQ Message-ID: <20210921175015.GE2059841@p14s> References: <20210914102641.1852544-1-suzuki.poulose@arm.com> <20210914102641.1852544-8-suzuki.poulose@arm.com> <20210921174110.GD2059841@p14s> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210921174110.GD2059841@p14s> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210921_105019_674436_B34C9D41 X-CRM114-Status: GOOD ( 34.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Sep 21, 2021 at 11:41:10AM -0600, Mathieu Poirier wrote: > On Tue, Sep 14, 2021 at 11:26:38AM +0100, Suzuki K Poulose wrote: > > The TRBE driver marks the AUX buffer as TRUNCATED when we get an IRQ > > on FILL event. This has rather unwanted side-effect of the event > > being disabled when there may be more space in the ring buffer. > > > > So, instead of TRUNCATE we need a different flag to indicate > > that the trace may have lost a few bytes (i.e from the point of > > generating the FILL event until the IRQ is consumed). Anyways, the > > userspace must use the size from RECORD_AUX headers to restrict > > the "trace" decoding. > > > > Using PARTIAL flag causes the perf tool to generate the > > following warning: > > > > Warning: > > AUX data had gaps in it XX times out of YY! > > > > Are you running a KVM guest in the background? > > > > which is pointlessly scary for a user. The other remaining options > > are : > > - COLLISION - Use by SPE to indicate samples collided > > - Add a new flag - Specifically for CoreSight, doesn't sound > > so good, if we can re-use something. > > > > Given that we don't already use the "COLLISION" flag, the above > > behavior can be notified using this flag for CoreSight. > > > > Cc: Mathieu Poirier > > Cc: James Clark > > Cc: Mike Leach > > Cc: Anshuman Khandual > > Cc: Leo Yan > > Signed-off-by: Suzuki K Poulose > > --- > > Changes since v2: > > - The perf tool patch for reporting collisions is queued. > > --- > > drivers/hwtracing/coresight/coresight-trbe.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c > > index de99dd0aecd3..a1a15fa6c4ae 100644 > > --- a/drivers/hwtracing/coresight/coresight-trbe.c > > +++ b/drivers/hwtracing/coresight/coresight-trbe.c > > @@ -612,7 +612,7 @@ static unsigned long arm_trbe_update_buffer(struct coresight_device *csdev, > > * for correct size. Also, mark the buffer truncated. > > */ > > write = get_trbe_limit_pointer(); > > - perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED); > > + perf_aux_output_flag(handle, PERF_AUX_FLAG_COLLISION); > > The rational in the changelog should be added here as a comment. > > > } > > > > offset = write - base; > > @@ -705,7 +705,7 @@ static void trbe_handle_overflow(struct perf_output_handle *handle) > > * Mark the buffer as truncated, as we have stopped the trace > > * collection upon the WRAP event, without stopping the source. > > */ > > - perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED); > > + perf_aux_output_flag(handle, PERF_AUX_FLAG_COLLISION); > > Same. ... and I'm out of time for today. I will continue tomorrow. Thanks, Mathieu > > > perf_aux_output_end(handle, size); > > event_data = perf_aux_output_begin(handle, event); > > if (!event_data) { > > -- > > 2.24.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel