Bug 75503 - WebKit spends ~8% of time in WriteBarrierBase::unvalidatedGet and JSCell::unvalidatedStructure for dromaeos' DOM attributes test
Summary: WebKit spends ~8% of time in WriteBarrierBase::unvalidatedGet and JSCell::unv...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-03 16:20 PST by Ryosuke Niwa
Modified: 2012-01-04 13:16 PST (History)
5 users (show)

See Also:


Attachments
profile result (shark) (deleted)
2012-01-03 16:21 PST, Ryosuke Niwa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2012-01-03 16:20:20 PST
Profiled DOM attributes on http://dromaeo.com/?dom

It seems like WebKit is spending ~8% of time in JSC::WriteBarrierBase<JSC::Structure>::unvalidatedGet() and JSCell::unvalidatedStructure. We're also spending 3.5% of time in locking a mutex inside a hash table. That seems like a lot of time. Maybe we should file a separate bug for that.

	4.7%	4.7%	JavaScriptCore	JSC::WriteBarrierBase<JSC::Structure>::unvalidatedGet() const
	0.0%	4.4%	JavaScriptCore	 JSC::JSCell::unvalidatedStructure()
	0.0%	0.1%	JavaScriptCore	 JSC::slowValidateCell(JSC::JSCell*)
	0.0%	0.0%	WebCore	 void JSC::validateCell<JSC::Structure*>(JSC::Structure*)
	0.0%	0.0%	WebCore	 WebCore::JSHTMLAnchorElement::put(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::JSValue, JSC::PutPropertySlot&)
	0.0%	0.0%	WebCore	 WebCore::JSHTMLHeadingElement::getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::PropertySlot&)
	0.0%	0.0%	WebCore	 WebCore::JSNode::put(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::JSValue, JSC::PutPropertySlot&)
	0.0%	0.0%	WebCore	 WebCore::JSHTMLElement::put(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::JSValue, JSC::PutPropertySlot&)
	0.0%	0.0%	WebCore	 WebCore::JSHTMLDivElement::getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::PropertySlot&)
	0.0%	0.0%	JavaScriptCore	 void JSC::validateCell<JSC::JSString*>(JSC::JSString*)
	3.5%	3.5%	libSystem.B.dylib	__spin_lock
	0.0%	1.9%	libSystem.B.dylib	 pthread_mutex_lock
	0.0%	1.9%	JavaScriptCore	  WTF::Mutex::lock()
	0.0%	1.9%	WebCore	   WTF::Locker<WTF::Mutex>::Locker(WTF::Mutex&)
	0.0%	0.5%	JavaScriptCore	    void WTF::removeIterator<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >(WTF::HashTableConstIterator<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >*)
	0.0%	0.5%	WebCore	    void WTF::removeIterator<WTF::StringImpl*, std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> >, WTF::PairFirstExtractor<std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> > >, WTF::StringHash, WTF::PairHashTraits<WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<JSC::Weak<JSC::JSString> > >, WTF::HashTraits<WTF::StringImpl*> >(WTF::HashTableConstIterator<WTF::StringImpl*, std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> >, WTF::PairFirstExtractor<std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> > >, WTF::StringHash, WTF::PairHashTraits<WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<JSC::Weak<JSC::JSString> > >, WTF::HashTraits<WTF::StringImpl*> >*)
	0.0%	0.4%	WebCore	    void WTF::addIterator<WTF::StringImpl*, std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> >, WTF::PairFirstExtractor<std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> > >, WTF::StringHash, WTF::PairHashTraits<WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<JSC::Weak<JSC::JSString> > >, WTF::HashTraits<WTF::StringImpl*> >(WTF::HashTable<WTF::StringImpl*, std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> >, WTF::PairFirstExtractor<std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> > >, WTF::StringHash, WTF::PairHashTraits<WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<JSC::Weak<JSC::JSString> > >, WTF::HashTraits<WTF::StringImpl*> > const*, WTF::HashTableConstIterator<WTF::StringImpl*, std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> >, WTF::PairFirstExtractor<std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> > >, WTF::StringHash, WTF::PairHashTraits<WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<JSC::Weak<JSC::JSString> > >, WTF::HashTraits<WTF::StringImpl*> >*)
	0.0%	0.4%	JavaScriptCore	    void WTF::addIterator<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >(WTF::HashTable<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> > const*, WTF::HashTableConstIterator<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >*)
	0.0%	0.1%	JavaScriptCore	    WTF::HashTable<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >::invalidateIterators()
	0.0%	0.0%	WebCore	    void WTF::removeIterator<WebCore::RenderObject*, std::pair<WebCore::RenderObject*, WebCore::RenderBlock::FloatingObject*>, WTF::PairFirstExtractor<std::pair<WebCore::RenderObject*, WebCore::RenderBlock::FloatingObject*> >, WTF::PtrHash<WebCore::RenderObject*>, WTF::PairHashTraits<WTF::HashTraits<WebCore::RenderObject*>, WTF::HashTraits<WebCore::RenderBlock::FloatingObject*> >, WTF::HashTraits<WebCore::RenderObject*> >(WTF::HashTableConstIterator<WebCore::RenderObject*, std::pair<WebCore::RenderObject*, WebCore::RenderBlock::FloatingObject*>, WTF::PairFirstExtractor<std::pair<WebCore::RenderObject*, WebCore::RenderBlock::FloatingObject*> >, WTF::PtrHash<WebCore::RenderObject*>, WTF::PairHashTraits<WTF::HashTraits<WebCore::RenderObject*>, WTF::HashTraits<WebCore::RenderBlock::FloatingObject*> >, WTF::HashTraits<WebCore::RenderObject*> >*)
	0.0%	1.5%	libSystem.B.dylib	 pthread_mutex_unlock
	0.0%	1.5%	JavaScriptCore	  WTF::Mutex::unlock()
	0.0%	1.5%	WebCore	   WTF::Locker<WTF::Mutex>::~Locker()
	0.0%	0.4%	JavaScriptCore	    void WTF::addIterator<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >(WTF::HashTable<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> > const*, WTF::HashTableConstIterator<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >*)
	0.0%	0.4%	WebCore	    void WTF::addIterator<WTF::StringImpl*, std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> >, WTF::PairFirstExtractor<std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> > >, WTF::StringHash, WTF::PairHashTraits<WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<JSC::Weak<JSC::JSString> > >, WTF::HashTraits<WTF::StringImpl*> >(WTF::HashTable<WTF::StringImpl*, std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> >, WTF::PairFirstExtractor<std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> > >, WTF::StringHash, WTF::PairHashTraits<WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<JSC::Weak<JSC::JSString> > >, WTF::HashTraits<WTF::StringImpl*> > const*, WTF::HashTableConstIterator<WTF::StringImpl*, std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> >, WTF::PairFirstExtractor<std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> > >, WTF::StringHash, WTF::PairHashTraits<WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<JSC::Weak<JSC::JSString> > >, WTF::HashTraits<WTF::StringImpl*> >*)
	0.0%	0.3%	WebCore	    void WTF::removeIterator<WTF::StringImpl*, std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> >, WTF::PairFirstExtractor<std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> > >, WTF::StringHash, WTF::PairHashTraits<WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<JSC::Weak<JSC::JSString> > >, WTF::HashTraits<WTF::StringImpl*> >(WTF::HashTableConstIterator<WTF::StringImpl*, std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> >, WTF::PairFirstExtractor<std::pair<WTF::StringImpl*, JSC::Weak<JSC::JSString> > >, WTF::StringHash, WTF::PairHashTraits<WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<JSC::Weak<JSC::JSString> > >, WTF::HashTraits<WTF::StringImpl*> >*)
	0.0%	0.3%	JavaScriptCore	    void WTF::removeIterator<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >(WTF::HashTableConstIterator<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >*)
	0.0%	0.1%	JavaScriptCore	    WTF::HashTable<WTF::StringImpl*, WTF::StringImpl*, WTF::IdentityExtractor, WTF::StringHash, WTF::HashTraits<WTF::StringImpl*>, WTF::HashTraits<WTF::StringImpl*> >::invalidateIterators()
	0.0%	0.0%	JavaScriptCore	    JSC::SlotVisitor::drainFromShared(JSC::SlotVisitor::SharedDrainMode)
	0.0%	0.1%	libSystem.B.dylib	 pthread_once
	0.0%	0.0%	libSystem.B.dylib	 szone_free_definite_size
	0.0%	0.0%	libSystem.B.dylib	 szone_malloc_should_clear
	0.0%	0.0%	libSystem.B.dylib	 restore_sem_to_pool
	3.0%	3.0%	WebCore	JSC::JSCell::unvalidatedStructure()
	0.0%	1.5%	JavaScriptCore	 JSC::slowValidateCell(JSC::JSCell*)
	0.0%	0.7%	WebCore	 void JSC::validateCell<JSC::Structure*>(JSC::Structure*)
	0.0%	0.2%	JavaScriptCore	 void JSC::validateCell<JSC::JSString*>(JSC::JSString*)
	0.0%	0.1%	WebCore	 WebCore::JSHTMLElement::getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::PropertySlot&)
	0.0%	0.1%	WebCore	 WebCore::JSHTMLAnchorElement::put(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::JSValue, JSC::PutPropertySlot&)
	0.0%	0.1%	WebCore	 WebCore::JSHTMLHeadingElement::getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::PropertySlot&)
	0.0%	0.1%	WebCore	 WebCore::JSHTMLElement::put(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::JSValue, JSC::PutPropertySlot&)
	0.0%	0.1%	WebCore	 void JSC::validateCell<JSC::JSCell*>(JSC::JSCell*)
	0.0%	0.0%	WebCore	 WebCore::jsElementPrototypeFunctionGetAttribute(JSC::ExecState*)
	0.0%	0.0%	WebCore	 WebCore::JSElement::put(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::JSValue, JSC::PutPropertySlot&)
	0.0%	0.0%	WebCore	 WebCore::jsElementPrototypeFunctionSetAttribute(JSC::ExecState*)
	0.0%	0.0%	JavaScriptCore	 JSC::JSCell::fastGetOwnPropertySlot(JSC::ExecState*, JSC::Identifier const&, JSC::PropertySlot&)
	0.0%	0.0%	WebCore	 WebCore::JSHTMLAnchorElement::getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::PropertySlot&)
	0.0%	0.0%	WebCore	 JSC::WriteBarrierBase<JSC::Structure>::operator->() const
	0.0%	0.0%	WebCore	 WebCore::JSNode::put(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::JSValue, JSC::PutPropertySlot&)
	0.0%	0.0%	WebCore	 WebCore::JSNode::getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::PropertySlot&)
	0.0%	0.0%	WebCore	 WebCore::JSElement::getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::Identifier const&, JSC::PropertySlot&)
	0.0%	0.0%	JavaScriptCore	 operationPutByIdNonStrict
	0.0%	0.0%	JavaScriptCore	 JSC::WriteBarrierBase<JSC::JSString>::operator->() const
	0.0%	0.0%	JavaScriptCore	 JSC::slowValidateCell(JSC::JSGlobalObject*)
	0.0%	0.0%	WebCore	 bool JSC::getStaticValueSlot<WebCore::JSHTMLElement, WebCore::JSElement>(JSC::ExecState*, JSC::HashTable const*, WebCore::JSHTMLElement*, JSC::Identifier const&, JSC::PropertySlot&)
Comment 1 Ryosuke Niwa 2012-01-03 16:21:01 PST
Created attachment 121015 [details]
profile result (shark)
Comment 2 Ryosuke Niwa 2012-01-04 13:16:24 PST
Apparently I was profiling on debug builds :(