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

"own" vs "total" #85

Open
aulwes opened this issue Nov 2, 2023 · 1 comment
Open

"own" vs "total" #85

aulwes opened this issue Nov 2, 2023 · 1 comment
Assignees
Labels
Milestone

Comments

@aulwes
Copy link

aulwes commented Nov 2, 2023

Hi,

I noticed there are 2 subkeys in the server code: "own" and "total" (in function getFlatProfile() of MaltProject.js). What is the difference between these 2 subkeys? which one is used for displaying allocations in webview? It looks like "own" is displayed in the "Memory usage on peak" section in the home page. But in the Sources page, if I select "Global peak" there, it seems to display "total" amounts instead of "own". Similarly, in the Calltree page, do the inclusive/exclusive values use "total" or "own"?

Thanks,Rob

@svalat
Copy link
Member

svalat commented Nov 6, 2023

Hi Rob,
sorry for the delay.

MALT tracks two sub-metric for every counter : owned & total as you noticed :

  • total : number of time malloc (free....) has been seen under this function (by looking in all call stacks, so accounting if called in child functions).
  • owned : number of time malloc (free) has been called exactly in this function.

Maybe I could have been better inspirated to reuse the naming of valgrind / kcachgrind : include (total) / self (owned).

If it is not clear enough feel free to say, it is nice to have the explanation somewhere which can be useful for possibly others too.

@svalat svalat added the doc label Nov 6, 2023
@svalat svalat self-assigned this Nov 6, 2023
@svalat svalat added this to the v1.2.3 milestone Nov 6, 2023
bernarda78 pushed a commit to bernarda78/malt that referenced this issue Sep 9, 2024
bernarda78 pushed a commit to bernarda78/malt that referenced this issue Sep 16, 2024
svalat added a commit that referenced this issue Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants