From: "David Wang" <00107082@163.com>
To: "Suren Baghdasaryan" <surenb@google.com>
Cc: kent.overstreet@linux.dev, keescook@chromium.org,
linux-kernel@vger.kernel.org
Subject: Re: [BUG?] memory allocation profiling: the counters are not non-decreasing.
Date: Thu, 6 Jun 2024 11:42:16 +0800 (CST) [thread overview]
Message-ID: <182db681.446d.18feba3de6a.Coremail.00107082@163.com> (raw)
In-Reply-To: <CAJuCfpFY=e3zNOMHgTM-HGxhk2c_nr=ODOo3Fk67_D4gNgzx-Q@mail.gmail.com>
At 2024-06-06 04:00:17, "Suren Baghdasaryan" <surenb@google.com> wrote:
>On Wed, Jun 5, 2024 at 5:37 AM David Wang <00107082@163.com> wrote:
>>
>> Hi,
>> I was playing with this new feature of memory allocation profiling, when I plot the data, grouped by caller's source dir,
>> I noticed that the counters are not non-decreasing.
>> If I understand this feature correctly, all counters should be non-decreasing, right?
>> Or is there some TTL for stale items?
>
>Hi David,
>Counters can decrease once an allocation is freed.
>Thanks,
>Suren.
>
Hi Suren,
Thanks for the quick response.
I guess I misunderstood this feature, no wonder I saw several "zero" values.
If "freed" memory is also tracked accurately, I feel this would be a very powerful feature!
Thx~
David
>>
>> Following is a simpler script demonstrating my sayings
>>
>> $ for i in {1..100}; do sudo cat /proc/allocinfo | grep " mm\/" | awk '{s+=$2}END{print s}'; sleep 10; done
>> 1194453
>> 1196935
>> 1198957
>> 1199716
>> 1200770
>> 1190795 <--- decrease here
>> 1192702
>> 1193070
>> 1193812
>> 1195069
>> 1196491
>> ...
>>
>> FYI
>> David
>>
prev parent reply other threads:[~2024-06-06 3:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 12:37 David Wang
2024-06-05 20:00 ` Suren Baghdasaryan
2024-06-06 3:42 ` David Wang [this message]
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=182db681.446d.18feba3de6a.Coremail.00107082@163.com \
--to=00107082@163.com \
--cc=keescook@chromium.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=surenb@google.com \
/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
all inboxes | Powered by JetHome®