Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accumulate all block entries in format_blocks #83

Merged
merged 1 commit into from
Nov 5, 2020
Merged

Accumulate all block entries in format_blocks #83

merged 1 commit into from
Nov 5, 2020

Conversation

Kuroneer
Copy link
Contributor

@Kuroneer Kuroneer commented Nov 5, 2020

Unless I'm mistaken (dealing with carriers in Erlang is not that easy), in recon_alloc, the format_blocks' Acc should be used when computing the total size and block count for an allocator. Otherwise, you get things like

  {mbcs,[{blocks,77,77,77},
          {blocks_size,7584,7584,7584},
          {foreign_blocks,[{ets_alloc,[{count,45,45,49},
                                       {size,45056,45056,46080}]},
                           {eheap_alloc,[{count,4,5,71},{size,243464,246480,246480}]},
                           {std_alloc,[{count,77,77,77},{size,7584,7584,7584}]}]},
          {raw_blocks,[{binary_alloc,[{count,1714,1715,1715},
                                      {size,1804080,1882840,1882840}]},
                       {ets_alloc,[{count,45,45,49},{size,45056,45056,46080}]},
                       {eheap_alloc,[{count,4,5,71},{size,243464,246480,246480}]},
                       {std_alloc,[{count,77,77,77},{size,7584,7584,7584}]}]},

when calling recon_alloc:allocators/0 (and recon_alloc:fragmentation/1)

@ferd
Copy link
Owner

ferd commented Nov 5, 2020

Yep that sounds right and I forgot about the accumulation, good catch.

@ferd ferd merged commit 4efbe8b into ferd:master Nov 5, 2020
ypisetsky added a commit to discord/instruments that referenced this pull request Jun 30, 2021
There is a bug in :recon_alloc.memory(:used) in OTP 23 that was fixed last November but has not been packed into a release (ferd/recon#83).
ypisetsky added a commit to discord/instruments that referenced this pull request Jul 1, 2021
There is a bug in :recon_alloc.memory(:used) in OTP 23 that was fixed last November but has not been packed into a release (ferd/recon#83).
ypisetsky added a commit to discord/instruments that referenced this pull request Jul 1, 2021
There is a bug in :recon_alloc.memory(:used) in OTP 23 that was fixed last November but has not been packed into a release (ferd/recon#83).
ypisetsky added a commit to discord/instruments that referenced this pull request Jul 1, 2021
There is a bug in :recon_alloc.memory(:used) in OTP 23 that was fixed last November but has not been packed into a release (ferd/recon#83).
ypisetsky added a commit to discord/instruments that referenced this pull request Jul 1, 2021
There is a bug in :recon_alloc.memory(:used) in OTP 23 that was fixed last November but has not been packed into a release (ferd/recon#83).
@ypisetsky
Copy link

Hi, sorry to come in here many months later, but it'd be nice to have a release with this fix (without it the output of :recon_alloc.memory(:used) can be way off in some cases (we observed 95%+ underreporting of used memory)).

@ferd
Copy link
Owner

ferd commented Jul 1, 2021

Done, sorry for having forgotten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants