Bug 33580

Summary: [BREWMP] Port currentThreadStackBase
Product: WebKit Reporter: Kwang Yul Seo <skyul>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: beergun, loki, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Other   
Bug Depends on:    
Bug Blocks: 33564    
Attachments:
Description Flags
Port currentThreadStackBase to BREW
eric: review-
Patch
none
Patch none

Kwang Yul Seo
Reported 2010-01-13 00:31:22 PST
IDEBUGGER_GetStackRange returns the initial address of the stack array. Because the stack grows downward, we can retrieve the stack base address by adding the stack size retrieved from IDEBUGGER_GetStackSize to the result of IDEBUGGER_GetStackRange. For BREW simulator, use WIN_OS currentThreadStackBase implementation as BREW simulator is essentially a Win32 program.
Attachments
Port currentThreadStackBase to BREW (2.66 KB, patch)
2010-01-13 00:34 PST, Kwang Yul Seo
eric: review-
Patch (5.51 KB, patch)
2010-06-24 00:06 PDT, Kwang Yul Seo
no flags
Patch (5.50 KB, patch)
2010-06-24 00:09 PDT, Kwang Yul Seo
no flags
Kwang Yul Seo
Comment 1 2010-01-13 00:34:05 PST
Created attachment 46431 [details] Port currentThreadStackBase to BREW
WebKit Review Bot
Comment 2 2010-01-13 00:38:45 PST
Attachment 46431 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 JavaScriptCore/runtime/Collector.cpp:551: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 1
Eric Seidel (no email)
Comment 3 2010-01-26 14:49:46 PST
Comment on attachment 46431 [details] Port currentThreadStackBase to BREW Wow, I would think creating/releasing some debugger object could be expensive. This function is called every time with garbage collect in JavaScriptCore. +#undef COMPILE_ASSERT problem, as mentioned in other bugs.
Kwang Yul Seo
Comment 4 2010-02-02 06:52:34 PST
This is the place where the behavior differs between BREW and BREW MP. There is no IDebugger interface in BREW MP, so we can't use it to retrieve the stack base address. I am looking for a way to get it.
Kwang Yul Seo
Comment 5 2010-06-24 00:06:06 PDT
Created attachment 59617 [details] Patch There is no way to get the stack base address in Brew MP. Make it possible to set it externally.
Kwang Yul Seo
Comment 6 2010-06-24 00:09:14 PDT
Created attachment 59618 [details] Patch Better naming.
Gabor Loki
Comment 7 2010-06-24 02:45:36 PDT
> +static void* s_stackBaseAddress; Avoid static data. JSC should be thread-safe.
Kwang Yul Seo
Comment 8 2010-06-24 09:40:00 PDT
(In reply to comment #7) > > +static void* s_stackBaseAddress; > > Avoid static data. JSC should be thread-safe. Yes, I know. However, Brew MP does support preemptive multi-threading. It does not have threads, mutexs and thread-specific variables. I turned on ENABLE(SINGLE_THREADED) for Brew MP.
Kwang Yul Seo
Comment 9 2010-10-01 10:02:41 PDT
It seems we have a better way to find the stack base in Brew MP 1.1.0. For example, we can set the stack size and base in IThread2Util_CreateThread. Unfortunately, Brew MP 1.1.0 is not yet publicly available.
Kwang Yul Seo
Comment 10 2012-07-26 05:19:28 PDT
Brew MP port is no longer maintained.
Note You need to log in before you can comment on or make changes to this bug.