RESOLVED FIXED 196836
Improve the Inline Cache Stats code
https://bugs.webkit.org/show_bug.cgi?id=196836
Summary Improve the Inline Cache Stats code
Michael Saboff
Reported 2019-04-11 16:24:59 PDT
There had been a little bit rot in the Inline Cache Statistics code. This patch is to address those issue and add a little bit more capability.
Attachments
Patch (25.60 KB, patch)
2019-04-11 16:46 PDT, Michael Saboff
saam: review+
Radar WebKit Bug Importer
Comment 1 2019-04-11 16:25:25 PDT
Michael Saboff
Comment 2 2019-04-11 16:46:43 PDT
Michael Saboff
Comment 3 2019-04-11 16:50:22 PDT
Comment on attachment 367264 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367264&action=review > Tools/Scripts/ic-stats.py:110 > + print "Trying to open \"{0}\"...".format(sys.argv[1]) Deleted this line locally.
Michael Saboff
Comment 4 2019-04-11 16:51:02 PDT
This is the kind of output the ic-stats.py script produces: Total Slow getById = 295,834,778 Total Slow putById = 31,270,401 Operation Base Property Location Count % tot ----------------------------------- -------------------- ------------------------------------ ------------ --------- slow OperationGetById Object __ember_meta__ self 62436278 22.5% OperationGetById Object toString proto lookup 34845746 11.8% OperationGetById Object hasOwnProperty proto lookup 29258531 10.7% OperationPutByIdNonStrict Object _super self 19380688 63.8% OperationGetById Object _super self 19216410 6.5% OperationGetById Object trigger proto lookup 12426411 4.2% OperationGetById Function toString proto lookup 9210778 3.1% OperationGetById Object isDestroyed proto lookup 8553798 2.9% OperationGetById Object constructor proto lookup 7834272 2.7% OperationGetById Object toStringExtension proto lookup 6264855 2.1% OperationGetById Object didRemoveListener proto lookup 6224125 2.1% OperationGetById Object didAddListener proto lookup 6167481 2.1% OperationGetById Object attrs self 4501599 1.5% OperationGetById Object __ember_meta__ proto lookup 3993339 22.5% OperationGetById Object __ember1554940456344 self 3556566 1.2% OperationPutByIdStrict Array length proto lookup 3475904 11.3% OperationGetById Object _renderNode self 3348433 1.1% OperationGetById Object isDescriptor proto lookup 3247885 1.2% OperationGetById Object __ember1554940461387 self 3168559 1.1% OperationGetById Object _propagateAttrsToThis proto lookup 3004106 1.0% OperationPutByIdStrict Object _isDispatchingAttrs self 2980890 9.5% ...
Saam Barati
Comment 5 2019-04-11 17:14:22 PDT
Comment on attachment 367264 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367264&action=review > Source/JavaScriptCore/ChangeLog:43 > +2019-04-11 Michael Saboff <msaboff@apple.com> > + > + Need a short description (OOPS!). > + Need the bug URL (OOPS!). > + > + Reviewed by NOBODY (OOPS!). > + > + * jit/ICStats.cpp: > + (JSC::ICEvent::operator< const): > + (JSC::ICEvent::dump const): > + * jit/ICStats.h: > + (JSC::ICEvent::ICEvent): > + (JSC::ICEvent::hash const): > + * jit/JITOperations.cpp: > + * jit/Repatch.cpp: > + (JSC::tryCacheGetByID): > + (JSC::tryCachePutByID): > + (JSC::tryCacheInByID): style: duplicate entries. remove this > Tools/ChangeLog:34 > +2019-04-11 Michael Saboff <msaboff@apple.com> > + > + Need a short description (OOPS!). > + Need the bug URL (OOPS!). > + > + Reviewed by NOBODY (OOPS!). > + > + * Scripts/ic-stats.py: Added. > + (ICStats): > + (ICStats.__init__): > + (ICStats.parse): > + (ICStats.dumpStats): > + (usage): ditto: remove > Tools/Scripts/ic-stats.py:104 > + print "Usage: {0} [ic-stats-file]".format(sys.argv[0]) can you also make this print with --help? Also, can you add information in this to how to generate ic-stats-file?
Michael Saboff
Comment 6 2019-04-11 17:51:22 PDT
(In reply to Saam Barati from comment #5) > Comment on attachment 367264 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=367264&action=review > > > Source/JavaScriptCore/ChangeLog:43 > > +2019-04-11 Michael Saboff <msaboff@apple.com> > > + > > + Need a short description (OOPS!). > > + Need the bug URL (OOPS!). > > + > > + Reviewed by NOBODY (OOPS!). > > + > > + * jit/ICStats.cpp: > > + (JSC::ICEvent::operator< const): > > + (JSC::ICEvent::dump const): > > + * jit/ICStats.h: > > + (JSC::ICEvent::ICEvent): > > + (JSC::ICEvent::hash const): > > + * jit/JITOperations.cpp: > > + * jit/Repatch.cpp: > > + (JSC::tryCacheGetByID): > > + (JSC::tryCachePutByID): > > + (JSC::tryCacheInByID): > > style: duplicate entries. remove this Removed. > > Tools/ChangeLog:34 > > +2019-04-11 Michael Saboff <msaboff@apple.com> > > + > > + Need a short description (OOPS!). > > + Need the bug URL (OOPS!). > > + > > + Reviewed by NOBODY (OOPS!). > > + > > + * Scripts/ic-stats.py: Added. > > + (ICStats): > > + (ICStats.__init__): > > + (ICStats.parse): > > + (ICStats.dumpStats): > > + (usage): > > ditto: remove Removed. > > Tools/Scripts/ic-stats.py:104 > > + print "Usage: {0} [ic-stats-file]".format(sys.argv[0]) > > can you also make this print with --help? > Also, can you add information in this to how to generate ic-stats-file? I added both of these items.
Michael Saboff
Comment 7 2019-04-11 17:53:14 PDT
Note You need to log in before you can comment on or make changes to this bug.