On Thu, Nov 29, 2012 at 7:41 PM, <[email protected]> wrote:

> In fact, I verified that *all* functions marked "inline" are
>
> actually inlined.
>>
>
> All the functions in the V8 header, or all function in the entire product?
> [...]
>

I checked that there are no undefined references for all functions marked
as "Inline" in our v8.h header.


> There are certainly functions in WebKit that we mark inline to get internal
> linkage that aren't actually inlined.


Huhu? "inline" doesn't change the kind of linkage, AFAIK a normal member
function marked "inline" still has external linkage, at least that's what I
remember from the spec. And it makes sense, e.g. if your inline function
has a static variable: With internal linkage you would suddenly get one
such variable per compilation unit, which is probably not what you meant
and is not something which should be changed by a compiler hint like
"inline".

Apart from that, we have quite a few "inline" functions in v8 itself which
don't get inlined at all. Some time ago I experimented with GCC's inlining
parameters to get almost all of them actually inlined, but the net result
was a bigger and somewhat *slower* v8. Inlining is a kind of sledge hammer
which shouldn't be overused IMHO.


> I was looking at a binary build with GYP_DEFINES="profiling=1".  I need to
> re-check that build and then check the build without profiling=1.


I'll try that GYP flag now, too, hopefully there is some documentation out
there about this. Just to be sure: We are both talking about
BUILDTYPE=Release, I guess.


> I'm open to fixing this in whichever way is appropriate.  I would expect
> all
> users of V8 to want to inline GetAlignedPointerFromInternalF**ield
> because (1)
> it's extremely short and (2) its purpose is to optimize the performance of
> the
> fast path.
>

If there is no other way to get performance gains in this area, I'm open
for forcing inlining, but in that case I really would like to do this for
*all* inline functions in v8.h, because your arguments hold for all of
them. :-) Picking one single function seems just wrong to me.

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to