WebKit Bugzilla
Attachment 359114 Details for
Bug 193422
: Add option to JSC to dump memory footprint on script completion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
193422.patch (text/plain), 2.88 KB, created by
Michael Saboff
on 2019-01-14 18:22:01 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Michael Saboff
Created:
2019-01-14 18:22:01 PST
Size:
2.88 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 239967) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2019-01-14 Michael Saboff <msaboff@apple.com> >+ >+ Add option to JSC to dump memory footprint on script completion >+ https://bugs.webkit.org/show_bug.cgi?id=193422 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added the --footprint option to dump peak and current memory usage. This uses the same >+ OS calls added in r2362362. >+ >+ * jsc.cpp: >+ (printUsageStatement): >+ (CommandLine::parseArguments): >+ (jscmain): >+ > 2019-01-14 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > [JSC] AI should check the given constant's array type when folding GetByVal into constant >Index: Source/JavaScriptCore/jsc.cpp >=================================================================== >--- Source/JavaScriptCore/jsc.cpp (revision 239967) >+++ Source/JavaScriptCore/jsc.cpp (working copy) >@@ -420,6 +420,7 @@ public: > String m_uncaughtExceptionName; > bool m_treatWatchdogExceptionAsSuccess { false }; > bool m_alwaysDumpUncaughtException { false }; >+ bool m_dumpMemoryFootprint { false }; > bool m_dumpSamplingProfilerData { false }; > bool m_enableRemoteDebugging { false }; > >@@ -2572,6 +2573,7 @@ static NO_RETURN void printUsageStatemen > fprintf(stderr, " --exception=<name> Check the last script exits with an uncaught exception with the specified name\n"); > fprintf(stderr, " --watchdog-exception-ok Uncaught watchdog exceptions exit with success\n"); > fprintf(stderr, " --dumpException Dump uncaught exception text\n"); >+ fprintf(stderr, " --footprint Dump memory footprint after done executing\n"); > fprintf(stderr, " --options Dumps all JSC VM options and exits\n"); > fprintf(stderr, " --dumpOptions Dumps all non-default JSC VM options before continuing\n"); > fprintf(stderr, " --<jsc VM option>=<value> Sets the specified JSC VM option\n"); >@@ -2720,6 +2722,11 @@ void CommandLine::parseArguments(int arg > continue; > } > >+ if (!strcmp(arg, "--footprint")) { >+ m_dumpMemoryFootprint = true; >+ continue; >+ } >+ > static const unsigned exceptionStrLength = strlen("--exception="); > if (!strncmp(arg, "--exception=", exceptionStrLength)) { > m_uncaughtExceptionName = String(arg + exceptionStrLength); >@@ -2928,6 +2935,12 @@ int jscmain(int argc, char** argv) > > printSuperSamplerState(); > >+ if (options.m_dumpMemoryFootprint) { >+ MemoryFootprint footprint = MemoryFootprint::now(); >+ >+ printf("Memory Footprint:\n Current Footprint: %llu\n Peak Footprint: %llu\n", footprint.current, footprint.peak); >+ } >+ > return result; > } >
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 193422
: 359114