public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Shunsuke <nakamura.shun@fujitsu.com>
To: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
	mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
	jolsa@redhat.com, namhyung@kernel.org, robh@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Jiri Olsa <jolsa@kernel.org>,
	Shunsuke Nakamura <nakamura.shun@fujitsu.com>
Subject: [PATCH v5 2/3] libperf: Remove scaling process from perf_mmap__read_self()
Date: Tue,  7 Dec 2021 17:22:44 +0900	[thread overview]
Message-ID: <20211207082245.604654-3-nakamura.shun@fujitsu.com> (raw)
In-Reply-To: <20211207082245.604654-1-nakamura.shun@fujitsu.com>

From: Shunsuke Nakamura <nakamura.shun@fujitsu.com>

Remove the scaling process from perf_mmap__read_self(), and unify the
counters that can be obtained from perf_evsel__read() to "no scaling".

Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
---
 tools/lib/perf/mmap.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/lib/perf/mmap.c b/tools/lib/perf/mmap.c
index c89dfa5f67b3..aaa457904008 100644
--- a/tools/lib/perf/mmap.c
+++ b/tools/lib/perf/mmap.c
@@ -353,8 +353,6 @@ int perf_mmap__read_self(struct perf_mmap *map, struct perf_counts_values *count
 		count->ena += delta;
 		if (idx)
 			count->run += delta;
-
-		cnt = mul_u64_u64_div64(cnt, count->ena, count->run);
 	}
 
 	count->val = cnt;
-- 
2.25.1


  parent reply	other threads:[~2021-12-07  8:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07  8:22 [PATCH v5 0/3] libperf: Unify scaling of counters obtained from perf_evsel__read() Shunsuke
2021-12-07  8:22 ` [PATCH v5 1/3] libperf: Move perf_counts_values__scale to tools/lib/perf Shunsuke
2021-12-07  8:22 ` Shunsuke [this message]
2021-12-07  8:22 ` [PATCH v5 3/3] libperf tests: Add test_stat_multiplexing test Shunsuke
2021-12-09 23:57   ` Namhyung Kim
2021-12-21  8:18     ` nakamura.shun
2021-12-08 21:18 ` [PATCH v5 0/3] libperf: Unify scaling of counters obtained from perf_evsel__read() Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211207082245.604654-3-nakamura.shun@fujitsu.com \
    --to=nakamura.shun@fujitsu.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox