WebKit Bugzilla
Attachment 370219 Details for
Bug 198026
: Add support for %pid in dumpJITMemoryPath
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198026-20190519085524.patch (text/plain), 2.17 KB, created by
Tadeu Zagallo
on 2019-05-18 23:55:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tadeu Zagallo
Created:
2019-05-18 23:55:25 PDT
Size:
2.17 KB
patch
obsolete
>Subversion Revision: 245500 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 547bd5233c9107bc7b5a9b844d7f9358126209c5..e5183b3aee21a4684027b9a91217be674c76da7a 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-05-18 Tadeu Zagallo <tzagallo@apple.com> >+ >+ Add support for %pid in dumpJITMemoryPath >+ https://bugs.webkit.org/show_bug.cgi?id=198026 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This is necessary when using dumpJITMemory with Safari. Otherwise, multiple WebContent >+ processes will try to write to the same file at the same time, which will crash since >+ the file is open with exclusive locking. >+ >+ * jit/ExecutableAllocator.cpp: >+ (JSC::dumpJITMemory): >+ > 2019-05-18 Tadeu Zagallo <tzagallo@apple.com> > > Add extra information to dumpJITMemory >diff --git a/Source/JavaScriptCore/jit/ExecutableAllocator.cpp b/Source/JavaScriptCore/jit/ExecutableAllocator.cpp >index 4be4b268e612e82498f492f893a6162a3d4eadfd..b11de5e2c10a34ae9accb66dd80d25f731260ac4 100644 >--- a/Source/JavaScriptCore/jit/ExecutableAllocator.cpp >+++ b/Source/JavaScriptCore/jit/ExecutableAllocator.cpp >@@ -31,8 +31,10 @@ > #include "CodeProfiling.h" > #include "ExecutableAllocationFuzz.h" > #include "JSCInlines.h" >+#include <wtf/FileSystem.h> > #include <wtf/MetaAllocator.h> > #include <wtf/PageReservation.h> >+#include <wtf/ProcessID.h> > #include <wtf/SystemTracing.h> > #include <wtf/WorkQueue.h> > >@@ -566,7 +568,9 @@ void dumpJITMemory(const void* dst, const void* src, size_t size) > static bool needsToFlush = false; > static auto flush = [](const AbstractLocker&) { > if (fd == -1) { >- fd = open(Options::dumpJITMemoryPath(), O_CREAT | O_TRUNC | O_APPEND | O_WRONLY | O_EXLOCK | O_NONBLOCK, 0666); >+ String path = Options::dumpJITMemoryPath(); >+ path = path.replace("%pid", String::number(getCurrentProcessID())); >+ fd = open(FileSystem::fileSystemRepresentation(path).data(), O_CREAT | O_TRUNC | O_APPEND | O_WRONLY | O_EXLOCK | O_NONBLOCK, 0666); > RELEASE_ASSERT(fd != -1); > } > write(fd, buffer, offset);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198026
: 370219