Bug 225617

Summary: Add support to collect stats on cumulative LinkBuffer linked sizes based on profiles.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch.
saam: review+, ews-feeder: commit-queue-
patch for landing.
ews-feeder: commit-queue-
patch for landing. none

Description Mark Lam 2021-05-10 14:43:53 PDT
This is used for VM development and tuning.
Comment 1 Mark Lam 2021-05-10 15:05:01 PDT
Created attachment 428210 [details]
proposed patch.
Comment 2 Saam Barati 2021-05-10 15:11:03 PDT
Comment on attachment 428210 [details]
proposed patch.

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

> Source/JavaScriptCore/ChangeLog:9
> +        1. Specify --dumpLinkBufferStats as an argument to the jsc shell.

maybe a JSC option too?
Comment 3 Saam Barati 2021-05-10 15:11:39 PDT
Comment on attachment 428210 [details]
proposed patch.

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

> Source/JavaScriptCore/ChangeLog:10
> +        2. Call $vm.dumpLinkBufferStats() from your JS script.

maybe have it return a string?
Comment 4 Mark Lam 2021-05-10 15:15:03 PDT
(In reply to Saam Barati from comment #2)
> Comment on attachment 428210 [details]
> proposed patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=428210&action=review
> 
> > Source/JavaScriptCore/ChangeLog:9
> > +        1. Specify --dumpLinkBufferStats as an argument to the jsc shell.
> 
> maybe a JSC option too?

A JSC option doesn't make sense to me because it doesn't say anything about when we should be dumping the stats.  So, I'll leave this out for now.
Comment 5 Mark Lam 2021-05-10 15:42:49 PDT
(In reply to Saam Barati from comment #3)
> Comment on attachment 428210 [details]
> proposed patch.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=428210&action=review
> 
> > Source/JavaScriptCore/ChangeLog:10
> > +        2. Call $vm.dumpLinkBufferStats() from your JS script.
> 
> maybe have it return a string?

I'll change $vm.dumpLinkBufferStats() to $vm.linkBufferStats() and have it return the stats as a string instead.
Comment 6 Mark Lam 2021-05-10 16:09:46 PDT
Created attachment 428215 [details]
patch for landing.
Comment 7 Mark Lam 2021-05-10 16:13:45 PDT
Created attachment 428216 [details]
patch for landing.
Comment 8 Mark Lam 2021-05-10 16:22:20 PDT
Thanks for the review.  Landed in r277305: <http://trac.webkit.org/r277305>.
Comment 9 Radar WebKit Bug Importer 2021-05-10 16:23:19 PDT
<rdar://problem/77794461>