Skip to content

[sgen] Add Ward annotations to sgen_get_total_allocated_bytes#20517

Merged
lambdageek merged 2 commits intomono:masterfrom
lambdageek:add-ward-total-alloc-count
Nov 6, 2020
Merged

[sgen] Add Ward annotations to sgen_get_total_allocated_bytes#20517
lambdageek merged 2 commits intomono:masterfrom
lambdageek:add-ward-total-alloc-count

Conversation

@lambdageek
Copy link
Member

@lambdageek lambdageek requested a review from BrzVlad as a code owner October 26, 2020 17:31
@lambdageek
Copy link
Member Author

cc @akoeplinger

@lambdageek lambdageek changed the title [sgen] Add Warn annotations to sgen_get_total_allocated_bytes [sgen] Add Ward annotations to sgen_get_total_allocated_bytes Oct 26, 2020
@lambdageek lambdageek force-pushed the add-ward-total-alloc-count branch from 57005cd to 331afff Compare October 26, 2020 18:25
@naricc
Copy link
Contributor

naricc commented Oct 26, 2020

What does MONO_PERMIT actually do?

@lambdageek
Copy link
Member Author

void sgen_update_allocation_count (void)
MONO_PERMIT (need (sten_world_stopped));
guint64 sgen_get_total_allocated_bytes (MonoBoolean precise)
MONO_PERMIT (need (sgen_lock_gc, sgen_stop_world));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I'm not sure if this matters, but sgen_get_total_allcoated_bytes only needs that lock if precise is true. I guess that is ok as a static over approximation though?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea Ward is not at all flow sensitive, so that kind of conditional information is lost on it.

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
@lambdageek
Copy link
Member Author

@monojenkins build failed

@lambdageek lambdageek merged commit 19acde9 into mono:master Nov 6, 2020
@lambdageek lambdageek deleted the add-ward-total-alloc-count branch November 6, 2020 04:18
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.

3 participants