| Summary: | Force PAS_ASSERT to generate different crash sites for each assertion. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||
| Component: | bmalloc | Assignee: | Mark Lam <mark.lam> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | ap, ggaren, webkit-bug-importer, ysuzuki | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
Created attachment 459003 [details]
[fast-cq] proposed patch.
Comment on attachment 459003 [details]
[fast-cq] proposed patch.
r=me
Comment on attachment 459003 [details]
[fast-cq] proposed patch.
Thanks for the review.
Do we need the same in WTF? (In reply to Alexey Proskuryakov from comment #5) > Do we need the same in WTF? No because WTF assertion crashes via WTFCrashWithInfoImpl. This effectively puts the caller on the stack, which points to the assertion site. Committed r293952 (250398@main): <https://commits.webkit.org/250398@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 459003 [details]. |
Clang currently optimizes all crash sites into one in each function. Hence, if we get a crash address at the 1 crash site, we don't know which failed assertion got us there. This patch uses an asm statement to force Clang to emit a different crash site for each assertion. Benchmarks show that performance is neutral on both Jetstream2 and Speedometer2. Size-wise, there is some increase. The following is the "size" output on JavaScriptCore on M1: __TEXT. __DATA __OBJC others dec hex old 19628032 180224 0 18792448 38600704 24d0000 new 19644416 180224 0 19251200 39075840 2544000 diff 16384 0 0 458752 475136 The increase in the "others" categories are mostly in the String Table, Symbol Table, and Function Start Addresses. These take up disk space but should not impact RAM usage unless they are accessed by a a debugger.