On Wed, Apr 6, 2016 at 6:39 PM, Petar Dobrev <
pe...@chobolabs.com> wrote:
> On Wed, Apr 6, 2016 at 12:28 PM, Ben Noordhuis <
in...@bnoordhuis.nl> wrote:
>>
>> On Wed, Apr 6, 2016 at 9:57 AM, Petar Dobrev <
peter....@gmail.com>
>> wrote:
>> > Hi!
>> >
>> > How would one go about obtaining function optimization and
>> > deoptimization
>> > info from an application with embedded v8? Something similar to the
>> > output
>> > that one gets from "--trace-deopt" in Chrome or node.
>> >
>> > Are there any resources online that I could consult?
>>
>> If you mean a programmatic API, then include/v8-profiler.h is the file
>> you want. I don't believe there's a way to get optimization info but
>> you can get the deopt and bailout reasons. (Bailout means a function
>> has been deoptimized and won't be optimized again.)
>>
>
> Thanks Ben!
>
> From what I understand, I can the deoptimization information from
> CpuProfileNode::GetDeoptInfos(), which in turn I get from running and
> stopping the profiler (CpuProfiler::StopProfiling()). This works great for
> me!
>
> Just out of curiosity, is there any way to get that info as it happens,
> without having to start and stop the profiler?
>
> Thanks again!
> Petar