Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5102925pxv; Tue, 6 Jul 2021 17:54:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCaWSbenXaxdloP1uSjnxBF74h83KBD7S0TtXGcSgzPwgjNfGDRuEoz2pAdzFNSrS3VNcl X-Received: by 2002:a05:6402:d56:: with SMTP id ec22mr16456420edb.213.1625619280708; Tue, 06 Jul 2021 17:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625619280; cv=none; d=google.com; s=arc-20160816; b=YsiKcOGclwqiEaCcCoJCy/KhlVH/T34w9dRomYv5TF2i2u063g+9r7E2yybHG6DrPc BfobOq7L7BMD+A4BDgCDN1dnpSP1NyZZJ0+XrN/AwYpZj5oJHfd9+04ZfjBpOcj8AUja ZosBtUioN6MddKZSqVwIDtEuP8vOXponMnrKaLgFNiIwVJ0lKjhx/Og5OijTaEBWMa7w fNUElDIZCK/0Is0a7iG6SmxS775FVfPoMF3OW6F/mqxZpDv0xXuINGKPm44vtlwuRFZM gEeV2TL24lYPhCsOr9X2gSvZKqEHykXJHLuPdYyJN7g7dAJViOrSXdKx2IcRkMc8Wht4 NUlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=WIj0S21MiV2RHWSYEgI7WjYwDiLL/e6PZS94A1MGA0M=; b=cOHOoIhjJY3/bJuwuAuCIc86qyZVovr721P+LLdaU4gnOe5X2/8Mcr9AhgBkfmAEFG QN4C1pntJyPiv7mw+g8ee3+yQldE3Jxv4TVCj1ZUZmIdJfOYQ9CEFjDFQRX9NJL0NAPG I/xIbtmKk/Rwo/6E8nfKdqK8huWtdUxBbnQQPGTXU2Xw+LcFn+qk7yS3fwucVqtBrf7y gRe9zun6EzuNjsUXlA+3G79TbY+ZGXxJmCEcnyl2b4V+p8SiYBIj3AQUyKvq66Dv/nhU PFDWfcAf+Xvcd8R7HxprNmPTTYAe8MI8JmRxdyLO+O6IGxiTfJHrflDZKz6NMxwP/y+Y lyOA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dh13si12322804edb.560.2021.07.06.17.54.17; Tue, 06 Jul 2021 17:54:40 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229987AbhGGAxW (ORCPT + 99 others); Tue, 6 Jul 2021 20:53:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:41666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229834AbhGGAxW (ORCPT ); Tue, 6 Jul 2021 20:53:22 -0400 Received: from rorschach.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0C81161CAA; Wed, 7 Jul 2021 00:50:41 +0000 (UTC) Date: Tue, 6 Jul 2021 20:50:39 -0400 From: Steven Rostedt To: Namhyung Kim Cc: LKML , Ingo Molnar , Andrew Morton , Tom Zanussi , Masami Hiramatsu , "Daniel Bristot de Oliveira Subject: [PATCH] tracing:" Subject: Re: [PATCH v2] tracing: Add linear buckets to histogram logic Message-ID: <20210706205039.64182493@rorschach.local.home> In-Reply-To: References: <20210706154315.3567166e@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 6 Jul 2021 16:20:07 -0700 Namhyung Kim wrote: > > { bytes_req: ~ 1400-1499 } hitcount: 30 > > { bytes_req: ~ 2000-2099 } hitcount: 6 > > { bytes_req: ~ 4000-4099 } hitcount: 2168 > > { bytes_req: ~ 5000-5099 } hitcount: 6 > > For consistency with the log2 histogram, I'd like to see > > { bytes_req: ~ 100 } hitcount: 3149 > { bytes_req: ~ 200 } hitcount: 1468 > { bytes_req: ~ 300 } hitcount: 39 > ... > > Or, if you really care about the value range > > { bytes_req: 0 ~ 99 } hitcount: 3149 > { bytes_req: 100 ~ 199 } hitcount: 1468 > { bytes_req: 200 ~ 299 } hitcount: 39 (Let the bike-shedding begin! ;-) I actually dislike the log2 notation. For example, I just ran it with this: ># echo 'hist:keys=bytes_req.log2:sort=bytes_req' > events/kmem/kmalloc/trigger ># cat events/kmem/kmalloc/hist # event histogram # # trigger info: hist:keys=bytes_req.log2:vals=hitcount:sort=bytes_req.log2:size=2048 [active] # { bytes_req: ~ 2^5 } hitcount: 8 { bytes_req: ~ 2^6 } hitcount: 2 { bytes_req: ~ 2^7 } hitcount: 4 { bytes_req: ~ 2^8 } hitcount: 2 { bytes_req: ~ 2^9 } hitcount: 2 { bytes_req: ~ 2^10 } hitcount: 3 Totals: Hits: 21 Entries: 6 Dropped: 0 And I don't know if that first entry is: 2^4 - 2^5 or if it is 2^5 - 2^6. And to me '~' means "approximately", but I also took it as "not exactly". I used it as: { bytes_req: ~ 1400-1499 } hitcount: 30 To mean, it's "approximately somewhere between 1400 and 1499" so, I kept the "~". Now for your suggestions: > { bytes_req: ~ 100 } hitcount: 3149 > { bytes_req: ~ 200 } hitcount: 1468 > { bytes_req: ~ 300 } hitcount: 39 Suffers the same fate as I dislike in log2. Is " ~ 100" 0-100 or 100-200? > { bytes_req: 0 ~ 99 } hitcount: 3149 > { bytes_req: 100 ~ 199 } hitcount: 1468 > { bytes_req: 200 ~ 299 } hitcount: 39 I feel is farther from log2 than my version. Stating that "~" means approximation, what does "0 ~ 99" really mean? So far I prefer my original version. BTW, we are also working on a user space parser for this, thus the output format of all hist logic is going to be a user space API (if it hasn't already become one.) So we do need to get this correct for the long haul. -- Steve