RESOLVED FIXED 142997
JSC should have a low-cost asynchronous disassembler
https://bugs.webkit.org/show_bug.cgi?id=142997
Summary JSC should have a low-cost asynchronous disassembler
Filip Pizlo
Reported 2015-03-23 21:23:11 PDT
Patch forthcoming. rdar://problem/20195217
Attachments
the patch (20.77 KB, patch)
2015-03-23 21:31 PDT, Filip Pizlo
mark.lam: review+
patch for landing (21.99 KB, patch)
2015-03-23 22:29 PDT, Filip Pizlo
no flags
Filip Pizlo
Comment 1 2015-03-23 21:31:09 PDT
Created attachment 249310 [details] the patch
WebKit Commit Bot
Comment 2 2015-03-23 21:33:50 PDT
Attachment 249310 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/assembler/LinkBuffer.h:327: Wrong number of spaces before statement. (expected: 9) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/assembler/LinkBuffer.h:346: Wrong number of spaces before statement. (expected: 9) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/assembler/LinkBuffer.h:349: Wrong number of spaces before statement. (expected: 9) [whitespace/indent] [4] Total errors found: 3 in 13 files If any of these errors are false positives, please file a bug against check-webkit-style.
Mark Lam
Comment 3 2015-03-23 22:08:09 PDT
Comment on attachment 249310 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=249310&action=review r=me with issues resolved. > Source/JavaScriptCore/disassembler/Disassembler.cpp:65 > + char* header { nullptr }; I think this should be a std::unique_ptr<char>. I see it being initialized with a strdup below but not cleaned up anywhere. > Source/JavaScriptCore/ftl/FTLCompile.cpp:825 > + } > + You need to dataLog(header) here to achieve equivalence for the old showDisassembly.
Filip Pizlo
Comment 4 2015-03-23 22:26:06 PDT
(In reply to comment #3) > Comment on attachment 249310 [details] > the patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=249310&action=review > > r=me with issues resolved. > > > Source/JavaScriptCore/disassembler/Disassembler.cpp:65 > > + char* header { nullptr }; > > I think this should be a std::unique_ptr<char>. I see it being initialized > with a strdup below but not cleaned up anywhere. The destructor frees it. I believe that it cannot be a unique_ptr since that won't call free(). Since I use strdup() to create it, I need to use free() to free it. > > > Source/JavaScriptCore/ftl/FTLCompile.cpp:825 > > + } > > + > > You need to dataLog(header) here to achieve equivalence for the old > showDisassembly. Good catch! Fixed.
Mark Lam
Comment 5 2015-03-23 22:28:21 PDT
Comment on attachment 249310 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=249310&action=review >>> Source/JavaScriptCore/disassembler/Disassembler.cpp:65 >>> + char* header { nullptr }; >> >> I think this should be a std::unique_ptr<char>. I see it being initialized with a strdup below but not cleaned up anywhere. > > The destructor frees it. I believe that it cannot be a unique_ptr since that won't call free(). Since I use strdup() to create it, I need to use free() to free it. I missed the free() call in the destructor. Looks good.
Filip Pizlo
Comment 6 2015-03-23 22:29:45 PDT
Created attachment 249312 [details] patch for landing
WebKit Commit Bot
Comment 7 2015-03-23 22:32:50 PDT
Attachment 249312 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/assembler/LinkBuffer.h:327: Wrong number of spaces before statement. (expected: 9) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/assembler/LinkBuffer.h:346: Wrong number of spaces before statement. (expected: 9) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/assembler/LinkBuffer.h:349: Wrong number of spaces before statement. (expected: 9) [whitespace/indent] [4] Total errors found: 3 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 8 2015-03-23 22:38:25 PDT
Note You need to log in before you can comment on or make changes to this bug.