Hi Martin, We've recently had a lot of work and refactorings around this topic, which has resulted in a de-facto split of code into Code objects (containing the majority metadata pointers, crsrc.org/c/v8/src/objects/code.h) and InstructionStream objects (containing the actual assembly, relocation information, and I think copies of some of the metadata pointers, crsrc.org/c/v8/src/objects/instruction-stream.h).
In the default configuration, InstructionStreams are allocated in a different space to Code objects (in "external code space"), outside of the main V8 sandbox, so your base assumption around sharing heap space doesn't apply; the reason for this is, among other things, specifically to avoid writes near the instruction stream. If you want to stress writes to the instruction streams, I think a decent approach is to stress moving GC with `--stress-compation`. Hope that helps. - Leszek On Mon, Jul 31, 2023 at 10:51 AM Martin Krištien <[email protected]> wrote: > Hi, > > I am exploring V8 JIT code generation as part of my PhD research and I've > observed that dynamic code often shares heap space with various metadata. I > wish to understand the access pattern for the metadata and its potential > impact on code execution performance (i.e. potentially polluting the > instruction cache on the host machine). > > Could somebody please help me with this or point me to a documentation > where I can learn more? > > What kind of metadata is stored with the Code objects? > When is it accessed? (reads/writes?) > What kind of application would stress a heavy use of the metadata? (i.e. > micro-benchmark?) > > Thanks, > Martin > > > -- > -- > 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/f78d9146-4649-4679-9ee5-e2bbfb53ae09n%40googlegroups.com > <https://groups.google.com/d/msgid/v8-dev/f78d9146-4649-4679-9ee5-e2bbfb53ae09n%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/CAGRskv9UpKhr87Tuni7vpAvJ3xVtsiNzBzkqACJq1O-EizRRVA%40mail.gmail.com.
