Issue 2370 in v8: dom-query.html spends ~10% of total time in OSAtomicAdd32Barrier on my Mac

4 views
Skip to first unread message

codesite...@google.com

unread,
Oct 17, 2012, 8:57:39 PM10/17/12
to v8-...@googlegroups.com
Status: New
Owner: ----

New issue 2370 by esei...@chromium.org: dom-query.html spends ~10% of total
time in OSAtomicAdd32Barrier on my Mac
http://code.google.com/p/v8/issues/detail?id=2370

dom-query.html spends ~10% of total time in OSAtomicAdd32Barrier on my Mac

That's a thread synchronization function, which is presumably part of the
GetIsolate() call at the top of GetElementWithInterceptor (since my
understanding is that you need to grab at per-thread storage to get the
isolate)

MaybeObject* JSObject::GetElementWithInterceptor(Object* receiver,
uint32_t index) {
Isolate* isolate = GetIsolate();

It looks like the caller KeyedLoadPropertyWithInterceptor already has an
Isolate* at their call-site, they just need a way to pass it down into
GetElementWithInterceptor.

Running Time Self Symbol Name
2798.0ms 9.1% 2798.0 OSAtomicAdd32Barrier$VARIANT$mp
1273.0ms 4.1% 0.0
v8::internal::JSObject::GetElementWithInterceptor(v8::internal::Object*,
unsigned int)
1273.0ms 4.1% 0.0
v8::internal::KeyedLoadPropertyWithInterceptor(v8::internal::Arguments,
v8::internal::Isolate*)

It's very possible I'm misunderstanding here. I don't have very good
symbols in this build in order to identify which line number is hot.


codesite...@google.com

unread,
Oct 17, 2012, 9:23:30 PM10/17/12
to v8-...@googlegroups.com

Comment #1 on issue 2370 by aba...@chromium.org: dom-query.html spends ~10%
of total time in OSAtomicAdd32Barrier on my Mac
http://code.google.com/p/v8/issues/detail?id=2370

Here's a patch that removes the call to GetIsolate:

https://codereview.chromium.org/11190044/

Can you check whether that improves the situation? It's not clear to me
what is calling OSAtomicAdd32Barrier.

codesite...@google.com

unread,
Oct 17, 2012, 9:25:42 PM10/17/12
to v8-...@googlegroups.com

Comment #2 on issue 2370 by aba...@chromium.org: dom-query.html spends ~10%
of total time in OSAtomicAdd32Barrier on my Mac
http://code.google.com/p/v8/issues/detail?id=2370

The only caller I see for OSAtomicAdd32Barrier is

OptimizingCompilerThread::Run()

It's not clear to me when that function is called or how it relates to
GetElementWithInterceptor.

codesite...@google.com

unread,
Oct 17, 2012, 9:54:23 PM10/17/12
to v8-...@googlegroups.com

Comment #3 on issue 2370 by esei...@chromium.org: dom-query.html spends
~10% of total time in OSAtomicAdd32Barrier on my Mac
http://code.google.com/p/v8/issues/detail?id=2370

Sorry, by dom-query I meant:
http://trac.webkit.org/browser/trunk/PerformanceTests/Dromaeo/dom-query.html

codesite...@google.com

unread,
Nov 14, 2012, 9:36:50 PM11/14/12
to v8-...@googlegroups.com

Comment #4 on issue 2370 by aba...@chromium.org: dom-query.html spends ~10%
of total time in OSAtomicAdd32Barrier on my Mac
http://code.google.com/p/v8/issues/detail?id=2370

See also https://codereview.chromium.org/11361275

codesite...@google.com

unread,
Nov 15, 2012, 2:11:11 AM11/15/12
to v8-...@googlegroups.com
Updates:
Cc: sven...@chromium.org

Comment #5 on issue 2370 by sven...@chromium.org: dom-query.html spends
~10% of total time in OSAtomicAdd32Barrier on my Mac
http://code.google.com/p/v8/issues/detail?id=2370

(No comment was entered for this change.)

codesite...@google.com

unread,
Feb 10, 2015, 4:49:16 AM2/10/15
to v8-...@googlegroups.com
Updates:
Status: Fixed

Comment #6 on issue 2370 by sven...@chromium.org: dom-query.html spends
~10% of total time in OSAtomicAdd32Barrier on my Mac
https://code.google.com/p/v8/issues/detail?id=2370

The method in question has be reworked, so the problem doesn't exist
anymore.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages