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]> 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]
> 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/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]
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/CAKSzg3QuW2X9a53ZpgmdfhVXefM%2BNecNabdkN3ikRrzQtpWcbg%40mail.gmail.com.

Reply via email to