Summary: | JSC_enableProfiler=true should also cause JSGlobalData to save the profiler output somewhere | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> | ||||||||||||
Component: | JavaScriptCore | Assignee: | Filip Pizlo <fpizlo> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | barraclough, benjamin, cmarcelo, ggaren, gyuyoung.kim, mark.lam, mhahnenberg, msaboff, ojan.autocc, oliver, rakuco, sam, webkit.review.bot | ||||||||||||
Priority: | P2 | ||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | All | ||||||||||||||
OS: | All | ||||||||||||||
Attachments: |
|
Description
Filip Pizlo
2013-03-23 19:55:51 PDT
Created attachment 194729 [details]
the patch
Created attachment 194730 [details]
the patch
Comment on attachment 194730 [details] the patch Attachment 194730 [details] did not pass win-ews (win): Output: http://webkit-commit-queue.appspot.com/results/17139880 Created attachment 194736 [details]
the patch
Spell GetCurrentProcessId correctly this time.
Comment on attachment 194736 [details] the patch Attachment 194736 [details] did not pass win-ews (win): Output: http://webkit-commit-queue.appspot.com/results/17139892 Created attachment 194751 [details]
the patch
another Win fix.
Comment on attachment 194751 [details]
the patch
Clearing r? because I need to add some horrible atexit hacks to make this practical. Apparently DRT doesn't delete it's JSGlobalData's.
> Apparently DRT doesn't delete it's JSGlobalData's.
This is really a WebKit issue: WebCore (intentionally) leaks its singleton JSGlobalData.
Created attachment 194977 [details]
the patch
Made the atexit() thing work.
Comment on attachment 194977 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=194977&action=review r=me > Source/JavaScriptCore/profiler/ProfilerDatabase.cpp:37 > +static SpinLock registrationLock; Needs " = SPINLOCK_INITIALIZER;". (In reply to comment #10) > (From update of attachment 194977 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=194977&action=review > > r=me > > > Source/JavaScriptCore/profiler/ProfilerDatabase.cpp:37 > > +static SpinLock registrationLock; > > Needs " = SPINLOCK_INITIALIZER;". Will do. But a question for future reference: isn't it true that on all platforms we care about, globals get initialized to all-zero? And if that's the case, and SPINLOCK_INITIALIZER is just { 0 }, then can't we just make things simpler and change SpinLock's contract to say that it guarantees that all-zero is a valid unlocked state and that we don't need " = SPINLOCK_INITIALIZER"? > But a question for future reference: isn't it true that on all platforms we care about, globals get initialized to all-zero? Yes. That's a part of the C/C++ ABI. > And if that's the case, and SPINLOCK_INITIALIZER is just { 0 } For !ENABLE(COMPARE_AND_SWAP) platforms, that's not the case: TCSpinLock.h:114: #define SPINLOCK_INITIALIZER { PTHREAD_MUTEX_INITIALIZER } pthread.h:#define PTHREAD_MUTEX_INITIALIZER {_PTHREAD_MUTEX_SIG_init, {0}} pthread_impl.h:#define _PTHREAD_MUTEX_SIG_init 0x32AAABA7 Comment on attachment 194977 [details] the patch Attachment 194977 [details] did not pass win-ews (win): Output: http://webkit-commit-queue.appspot.com/results/17120904 Landed in http://trac.webkit.org/changeset/146932 |