Hi Matheus, I think --perf-prof isn't used that frequently by us (others 
might use it more than I do) but I can review patches there 
([email protected]).

Cheers

On Thursday, September 12, 2019 at 3:44:49 PM UTC+2, Matheus Marchini wrote:
>
> Oh, ok, that makes sense. I thought I saw code relocations in production 
> which were messing with our profiling, but we are using the 
> CodeEventHandler API, so code moves are not disabled.
>
> It's possible to make Linux perf understand code relocations though: 
> --perf-prof writes a jitdump file, which has support for code relocations 
> through timestamps.
>
> I'm already writing a pull request to report code moves through the 
> CodeEventHandler API. Would you be interested in a pull request to make 
> --perf-prof work with code relocations as well?
>
> On Thu, Sep 12, 2019, 2:03 AM Jakob Kummerow <[email protected] 
> <javascript:>> wrote:
>
>> Code relocation is not supported *by (external) profiling tools, *because 
>> mapping a pc to a function when processing the log file is hard when that 
>> function has been moving around over time. Without profiling, Code objects 
>> are relocatable.
>>
>> The CHECK right below the comment you found guarantees that it is not 
>> outdated: CHECK(from.IsBytecodeArray()); would cause a crash if the 
>> function was called with a Code object.
>>
>> And src/flags/flag-definitions.h is where the magic happens: 
>> DEFINE_NEG_IMPLICATION(perf_prof, 
>> compact_code_space) turns off code space compaction when profiling.
>>
>>
>> On Thu, Sep 12, 2019 at 2:25 AM <[email protected] <javascript:>> wrote:
>>
>>> I just found this comment on the codebase:
>>>
>>>     // We may receive a CodeMove event if a BytecodeArray object moves. 
>>> Otherwise
>>>     // code relocation is not supported.
>>>
>>> (
>>> https://chromium.googlesource.com/v8/v8/+/refs/heads/master/src/diagnostics/perf-jit.cc#497
>>> )
>>>
>>> I thought (optimized) code objects were allowed relocation (enabled by 
>>> default with --compact-code-space). Is this comment outdated, or is my 
>>> understanding incorrect?
>>>
>>> -- 
>>> -- 
>>> v8-dev mailing list
>>> [email protected] <javascript:>
>>> http://groups.google.com/group/v8-dev
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "v8-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected] <javascript:>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/v8-dev/cb765436-928c-4f29-b334-cf60581ae89f%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/v8-dev/cb765436-928c-4f29-b334-cf60581ae89f%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> -- 
>> -- 
>> v8-dev mailing list
>> [email protected] <javascript:>
>> http://groups.google.com/group/v8-dev
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "v8-dev" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/v8-dev/7cGYttemOFQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/v8-dev/CAKSzg3QuW2X9a53ZpgmdfhVXefM%2BNecNabdkN3ikRrzQtpWcbg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/v8-dev/CAKSzg3QuW2X9a53ZpgmdfhVXefM%2BNecNabdkN3ikRrzQtpWcbg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/6e9237e1-32a6-402b-bab3-fd00c805fe5a%40googlegroups.com.

Reply via email to