Bug 183387 - Prepare LLInt code to support pointer profiling.
Summary: Prepare LLInt code to support pointer profiling.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on: 183492
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-06 16:18 PST by Mark Lam
Modified: 2018-03-09 13:35 PST (History)
8 users (show)

See Also:


Attachments
proposed patch. (46.75 KB, patch)
2018-03-06 20:14 PST, Mark Lam
jfbastien: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2018-03-06 16:18:05 PST
Patch coming.
Comment 1 Radar WebKit Bug Importer 2018-03-06 16:18:44 PST
<rdar://problem/38199678>
Comment 2 Mark Lam 2018-03-06 20:14:14 PST
Created attachment 335170 [details]
proposed patch.
Comment 3 JF Bastien 2018-03-06 21:39:57 PST
Comment on attachment 335170 [details]
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=335170&action=review

r=me

> Source/JavaScriptCore/llint/LLIntData.cpp:90
> +            ExceptionHandlerPtrTag, // handleUncaughtException

This seems brittle. Could we auto-gen this or something like xmacros?

> Source/JavaScriptCore/offlineasm/ast.rb:932
> +        when "tagReturnAddress", "untagReturnAddress"

FIXME?

> Source/JavaScriptCore/runtime/PtrTag.h:73
> +    inline constexpr T removeCodePtrTag(PtrType ptr) { return bitwise_cast<T>(ptr); }

Weird indent.
Comment 4 Mark Lam 2018-03-06 21:55:12 PST
Comment on attachment 335170 [details]
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=335170&action=review

Thanks for the review.  Responses below.

>> Source/JavaScriptCore/llint/LLIntData.cpp:90
>> +            ExceptionHandlerPtrTag, // handleUncaughtException
> 
> This seems brittle. Could we auto-gen this or something like xmacros?

The 2 static asserts below makes this not brittle.  They will catch the case where new opcodes get added.  We can revisit this later if we want to do something fancier for this.

>> Source/JavaScriptCore/offlineasm/ast.rb:932
>> +        when "tagReturnAddress", "untagReturnAddress"
> 
> FIXME?

This is the intended behavior i.e. these are no-ops by default.  So, I'll leave them as is.

>> Source/JavaScriptCore/runtime/PtrTag.h:73
>> +    inline constexpr T removeCodePtrTag(PtrType ptr) { return bitwise_cast<T>(ptr); }
> 
> Weird indent.

Oops.  Will fix.
Comment 5 Mark Lam 2018-03-06 22:45:31 PST
Landed in r229354: <http://trac.webkit.org/r229354>.
Comment 6 WebKit Commit Bot 2018-03-08 17:59:46 PST
Re-opened since this is blocked by bug 183492
Comment 7 Mark Lam 2018-03-09 13:35:58 PST
Re-landed in r229481: <http://trac.webkit.org/r229481>.