[webkit-changes] [WebKit/WebKit] d146ac: [JSC] ICStats should not copy Identifier in differ...
Yusuke Suzuki
noreply at github.com
Sat Sep 17 00:09:50 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d146ac52ed34ae6c89be3137789cff8133bba362
https://github.com/WebKit/WebKit/commit/d146ac52ed34ae6c89be3137789cff8133bba362
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2022-09-17 (Sat, 17 Sep 2022)
Changed paths:
A JSTests/stress/ic-stats-concurrent.js
M Source/JavaScriptCore/jit/ICStats.cpp
M Source/WTF/wtf/Spectrum.h
M Source/WTF/wtf/StackShotProfiler.h
Log Message:
-----------
[JSC] ICStats should not copy Identifier in different thread
https://bugs.webkit.org/show_bug.cgi?id=245309
rdar://98312727
Reviewed by Mark Lam.
ICStats have Spectrum<ICEvent, uint64_t> and ICEvent includes Identifier.
However since Spectrum::buildList copies ICEvent, we end up copying Identifier in the different thread
from the main thread since ICStats dump happens in a side thread.
This patch changes Spetrum so that buildList does not copy the key, and instead we keep a lock during
list iteration.
* JSTests/stress/ic-stats-concurrent.js: Added.
* Source/JavaScriptCore/jit/ICStats.cpp:
(JSC::ICStats::ICStats):
* Source/WTF/wtf/Spectrum.h:
(WTF::Spectrum::KeyAndCount::KeyAndCount):
(WTF::Spectrum::KeyAndCount::operator< const):
(WTF::Spectrum::getLock):
(WTF::Spectrum::buildList const):
* Source/WTF/wtf/StackShotProfiler.h:
(WTF::StackShotProfiler::run):
Canonical link: https://commits.webkit.org/254585@main
More information about the webkit-changes
mailing list