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 68233C433EF for ; Tue, 21 Sep 2021 17:43:45 +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 3EA34610A0 for ; Tue, 21 Sep 2021 17:43:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3EA34610A0 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=MKeqpikOeHevhdlMYWBYsTygB9K02swM4+f0DUbjuRg=; b=trLZVv9f8UXfJm 3JJdZLBAw1cLQKQ5NFYBO1Fl3v38jaZSl2/RlQqojC93d9YeTBjFeJ9I6OXzhlQpWKuKUaSiDUb3n pjiqzd/JzSmPGxl4XxAOiqgu8MOdYY6ShgvQx3QLFWEoVkxtd7m/ijrLXokW/P5Oy+XRXDU30BfVj VueXb8ffWrRy5yH/Gm0bF52cQiTWsWXioQXDW5UtM7godp2K+Z29LDkyAh19B7HX/bRxQmJIaMRxv QCMkZbu/xCGVX2IBUJRWzZNJajsmObC0mcBlWSajYcDd5A9TVAO/wj7ZSQPhw8msn3zppyBCAkXPB 8Y6ydOkedTSleO9my4DQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSjli-005LuX-Qz; Tue, 21 Sep 2021 17:41:23 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSjla-005Lta-NI for linux-arm-kernel@lists.infradead.org; Tue, 21 Sep 2021 17:41:16 +0000 Received: by mail-pj1-x1029.google.com with SMTP id z14-20020a17090a8b8e00b0019cc29ceef1so2544365pjn.1 for ; Tue, 21 Sep 2021 10:41:14 -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=qx/wbj0vOXM0Y/2iSD3RqmerO2R3x4A/LHChA1EVWAY=; b=VgA4GdrNtyLs/6eUljlo0QiGfUXpNSrYESlD7Cb2x78tf5+hbrOy7SBB2VXWQocIrX IPxjsuhU8CBdwpro+2W9qh3L8r9HjHLbxmJ8A2XwFOpCU/5tgBLj/g/9lpKGwcsJLbN1 a6agyx4uBkJprBJYqIbsk0vO6t81k7S5cvZfWlvFg7J/Gu0SgV/HDEWTNgH2mwz1fKXo ZjEGgWWGl5lJnMPHfjaqHZMUFyIh0z2J9jXrlA3oQYnOrAg3oKHi0SRz53Cedgf4fJW9 tuZno1wo6AxosPGy1sPDZSCEWQywIryMldsnsVCSS4X9czban7bV6Vu6i7RHvPfNDDVz QFgw== 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=qx/wbj0vOXM0Y/2iSD3RqmerO2R3x4A/LHChA1EVWAY=; b=ZUj6tUuJS652iocFGGTRzhgafQmvk61hoC4Amma2cNJIt+7/ZLTzTnNhSxc6LXj97w 9k8ajTCincq68Q6ezQGtkbkCCswWwLUDeYPWSKWBdSWYqLwM6K4pN6u9FYYTp11ATTgF r6pyDyrcQ0/b1Q+PxE4ciScanEFnScDtTVmYScjXrv4jzrHZ1JCQEa5EpNuFS5+fRD0h DvhzPTYmMlCXMnwnYVfaG/89Gm8ofwQbIsBCkzIELrW6oTooKd1jWPE1u7iTcbG4Dpqc HRPPbkFim0sXDJa5z/fHj9Z86Eq5Hk6RS6rs24BkfeBEFZ+fr3kgu3dZfSqmVsn2be69 Y/+A== X-Gm-Message-State: AOAM530tOQYavRTn9b/zoqP1zkA7iZvyqD3IIbhpKIAxW5SwQz4GbwMW +dS7y88kVPRBe/d06Ik8/mvanA== X-Google-Smtp-Source: ABdhPJx2scVZeRRiQZ4pv1YyO3QxCEyK10Bn3BLWNU4W1rK+miDghxwJOHfHnlQ1/OytmiNm5FFbOw== X-Received: by 2002:a17:90a:5894:: with SMTP id j20mr6731055pji.82.1632246073521; Tue, 21 Sep 2021 10:41:13 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id c199sm18264342pfb.152.2021.09.21.10.41.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Sep 2021 10:41:12 -0700 (PDT) Date: Tue, 21 Sep 2021 11:41:10 -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: <20210921174110.GD2059841@p14s> References: <20210914102641.1852544-1-suzuki.poulose@arm.com> <20210914102641.1852544-8-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210914102641.1852544-8-suzuki.poulose@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210921_104114_821716_E02C2A1C X-CRM114-Status: GOOD ( 30.88 ) 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 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. > 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