Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

gc: Remove resetThreadLocalStats() - #2629

Merged
dlang-bot merged 1 commit into
dlang:masterfrom
leandro-lucarella-sociomantic:no-reset
Jun 4, 2019
Merged

gc: Remove resetThreadLocalStats()#2629
dlang-bot merged 1 commit into
dlang:masterfrom
leandro-lucarella-sociomantic:no-reset

Conversation

@leandro-lucarella-sociomantic

Copy link
Copy Markdown
Contributor

As pointed out by @rainers in #2607, having a way to reset the total memory allocated in a thread is a bad API design as if there are multiple clients they will be competing for the reset.

Instead clients can store the previous value and subtract the next reading to know how much memory was allocated between two arbitrary points and deal with potential overflow.

Having a way to reset the total memory allocated in a thread is a bad
API design as if there are multiple clients they will be competing for
the reset.

Instead clients can store the previous value and subtract the next
reading to know how much memory was allocated between two arbitrary
points and deal with potential overflow.
@dlang-bot

Copy link
Copy Markdown

Thanks for your pull request, @leandro-lucarella-sociomantic!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + druntime#2629"

@leandro-lucarella-sociomantic

Copy link
Copy Markdown
Contributor Author

Just for the records, using the 2 commands to use digger to test locally doesn't work. I have installed the dmd-compiler debian package (2.086.0-0).

Error messages

Building package digger in /home/luca/.dub/packages/digger-3.0.0-alpha-7/digger/
Fetching ae 0.0.2177 (getting selected version)...
Performing "debug" build using /usr/bin/dmd for x86_64.
digger 3.0.0-alpha-7: building configuration "application"...
../../.dub/packages/ae-0.0.2177/ae/sys/data.d(486,2): Deprecation: class allocators have been deprecated, consider moving the allocation strategy outside of the class
../../.dub/packages/ae-0.0.2177/ae/sys/data.d(505,8): Deprecation: class deallocators have been deprecated, consider moving the deallocation strategy outside of the class
../../.dub/packages/ae-0.0.2177/ae/net/asockets.d(667,11): Error: undefined identifier __ArrayDtor
../../.dub/packages/ae-0.0.2177/ae/utils/iconv.d(59,21): Error: undefined identifier __ArrayCast in module object
../../.dub/packages/ae-0.0.2177/ae/utils/iconv.d(62,21): Error: undefined identifier __ArrayCast in module object
/home/luca/devel/phobos/std/regex/internal/backtracking.d(151,18): Error: undefined identifier __ArrayCast in module object
/home/luca/devel/phobos/std/conv.d(4705,9): Error: static assert:  "Don't know how to initialize an object of type EngineType!(char, Input!char) with arguments (const(Regex!char), Input!char, void[])"
/home/luca/devel/phobos/std/conv.d(4784,21):        instantiated from here: emplace!(EngineType!(char, Input!char), const(Regex!char), Input!char, void[])
/home/luca/devel/phobos/std/regex/internal/ir.d(502,41):        instantiated from here: emplace!(EngineType!(char, Input!char), const(Regex!char), Input!char, void[])
/home/luca/devel/phobos/std/regex/internal/parser.d(35,28):        instantiated from here: RuntimeFactory!(BacktrackingMatcher, char)
/home/luca/devel/phobos/std/regex/internal/parser.d(1025,25):        ... (4 instantiations, -v to show) ...
../../.dub/packages/ae-0.0.2177/ae/utils/regex.d(38,12):        instantiated from here: regex!string
../../.dub/packages/ae-0.0.2177/ae/sys/cmd.d(226,45):        instantiated from here: re!("(%(.*?)%)", [])
/usr/bin/dmd failed with exit code 1.

@wilzbach

wilzbach commented Jun 4, 2019

Copy link
Copy Markdown
Contributor

Just for the records, using the 2 commands to use digger to test locally doesn't work. I have installed the dmd-compiler debian package (2.086.0-0).

Well, looks like you can't even build digger. Could you report this at the digger repo?
https://github.com/CyberShadow/digger

Thanks.

@leandro-lucarella-sociomantic

Copy link
Copy Markdown
Contributor Author

Well, looks like you can't even build digger. Could you report this at the digger repo?

Ok, trying in an empty directory (I tried it in the druntime repo) seems to work. There was an interfering dmd.conf in there... 🤦‍♂️

@leandro-lucarella-sociomantic

Copy link
Copy Markdown
Contributor Author

FYI @RazvanN7

@rainers

rainers commented Jun 5, 2019

Copy link
Copy Markdown
Member

Thanks, @leandro-lucarella-sociomantic

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants