This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Call getStats when the region is exhausted
ClosedPublic

Authored by Chia-hungDuan on Jan 17 2023, 11:51 AM.

Details

Summary

Because of lock contention, we temporarily disabled the printing of
regions' status when it's exhausted. Given that it's useful when the
Region OOM happens, this CL brings it back without lock contention.

Diff Detail

Event Timeline

Chia-hungDuan created this revision.Jan 17 2023, 11:51 AM
Chia-hungDuan requested review of this revision.Jan 17 2023, 11:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 17 2023, 11:51 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
cryptoad added inline comments.Jan 17 2023, 12:13 PM
compiler-rt/lib/scudo/standalone/primary64.h
112

Both this one and the one below should probably be const.

146

Looks like there might an extra semi-colon here.

155

Is the change from ==1 to >=2 related to the issue at hand?

170

I agree that it should die if we can't get BatchClassId blocks, otherwise it's going to spiral quickly into something that might be harder to debug.

Chia-hungDuan marked 3 inline comments as done.

Address review comment

Chia-hungDuan added inline comments.Jan 19 2023, 11:17 AM
compiler-rt/lib/scudo/standalone/primary64.h
155

Oh sorry, it's not related to any issue. I thought that may be more clear. If you think it's better to keep as before, I'll change it back

170

Done and abort

cferris requested changes to this revision.Feb 9 2023, 11:03 PM

Just small nits.

compiler-rt/lib/scudo/standalone/primary64.h
112

Another small nit, this is probably better named RegionIsExhausted.

125

Might be better expressed as:

requires locking each region

176

Theoretically

This revision now requires changes to proceed.Feb 9 2023, 11:03 PM
Chia-hungDuan marked 3 inline comments as done.

Address review comments

cferris accepted this revision.Feb 10 2023, 2:30 PM

LGTM

This revision is now accepted and ready to land.Feb 10 2023, 2:30 PM
This revision was automatically updated to reflect the committed changes.