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

Also collect total bytes allocated in alloc tests #1115 #1116

Merged

Conversation

@ktoso
Copy link
Member

ktoso commented Aug 19, 2019

Motivation:

It is useful/interesting to have an overview about total bytes
allocated, not only the number of malloc calls.

This is not used to fail tests though, more as an informational thing.

Modifications:

Introduce and hit new counter with allocated size whenever allocations
happen.

Result:

  • It is possible to inspect the total allocated bytes.
  • Resolves #1115
@ktoso

This comment has been minimized.

Copy link
Member Author

ktoso commented Aug 19, 2019

Though it can be debated if / how / when / where such counting should take place.
I had a need to write such tests to inspect some things, and either we'll end up having the mini framework copied or we can push these upstream...

One could argue that those counters are more interesting "development time", though then the question remains where and how to insert them when I want to explore memory footprint etc. 🤔

@Lukasa Lukasa requested a review from weissi Aug 19, 2019
@Lukasa Lukasa added this to the 2.7.0 milestone Aug 19, 2019
@ktoso ktoso force-pushed the ktoso:wip-dont-override-git-names-if-dont-have-to branch 2 times, most recently from 13bcba1 to 42c9e43 Aug 19, 2019
Copy link
Member

weissi left a comment

awesome, thank you. Two nits

@ktoso ktoso force-pushed the ktoso:wip-dont-override-git-names-if-dont-have-to branch from 42c9e43 to 07b6d6c Aug 19, 2019
@ktoso

This comment has been minimized.

Copy link
Member Author

ktoso commented Aug 19, 2019

Comments addresed, sorry that was a bit messy; thanks for accepting, will make my life a bit simpler :)

@Lukasa Lukasa modified the milestones: 2.7.0, 2.8.0 Aug 20, 2019
@ktoso

This comment has been minimized.

Copy link
Member Author

ktoso commented Aug 27, 2019

Sorry for delay, will get back to this today or tomorrow

@weissi weissi removed this from the 2.8.0 milestone Sep 9, 2019
@weissi

This comment has been minimized.

Copy link
Member

weissi commented Nov 8, 2019

friendly ping @ktoso

@ktoso

This comment has been minimized.

Copy link
Member Author

ktoso commented Nov 9, 2019

Whoa that's been a long "tomorrow" :-/

To conclude #1116 (comment) , the type should be intptr_t then? I'll make the change.

Terribly sorry for leaving it hanging such long time

@weissi

This comment has been minimized.

Copy link
Member

weissi commented Nov 9, 2019

@ktoso don't apologise! I'm happy with intptr_t or uintptr_t, whatever is easiest for you.

@ktoso ktoso force-pushed the ktoso:wip-dont-override-git-names-if-dont-have-to branch from 07b6d6c to 7c3c2b0 Nov 11, 2019
@weissi

This comment has been minimized.

Copy link
Member

weissi commented Nov 11, 2019

@ktoso the integration tests failed. You should be able to run them locally with

IntegrationTests/run-tests -d -f allocation

the -d enables debug and the -f filters out (a regex).

Motivation:

It is useful/interesting to have an overview about total bytes
allocated, not only the number of malloc calls.

This is not used to fail tests though, more as an informational thing.

Modifications:

Introduce and hit new counter with allocated size whenever allocations
happen.

Result:

It is possible to inspect the total allocated bytes.
@ktoso ktoso force-pushed the ktoso:wip-dont-override-git-names-if-dont-have-to branch from 7c3c2b0 to 76236ac Nov 14, 2019
@weissi
weissi approved these changes Nov 14, 2019
Copy link
Member

weissi left a comment

awesome, thank you!!

@ktoso ktoso requested a review from Lukasa Nov 14, 2019
@ktoso

This comment has been minimized.

Copy link
Member Author

ktoso commented Nov 27, 2019

Updating branch.

@weissi weissi added this to the 2.11.0 milestone Nov 27, 2019
@weissi

This comment has been minimized.

Copy link
Member

weissi commented Nov 27, 2019

@Lukasa ping

@Lukasa
Lukasa approved these changes Nov 27, 2019
Copy link
Contributor

Lukasa left a comment

LGTM.

@Lukasa Lukasa merged commit 8c0e373 into apple:master Nov 27, 2019
4 checks passed
4 checks passed
pull request validation (5.0) Build finished.
Details
pull request validation (5.1) Build finished.
Details
pull request validation (api breakage) Build finished.
Details
pull request validation (sanity) Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.