Have a look at [0], which describes the memory layout of code objects. The
RelocInfo is currently a separate object and Code objects store a pointer
to it.

[0]
https://cs.chromium.org/chromium/src/v8/src/objects/code.h?l=369&rcl=ff6b34b468c1eae8589b278923f87e2f573bc248

On Thu, Apr 19, 2018 at 11:57 PM, Mingwei Zhang <mingwayzh...@gmail.com>
wrote:

> Hi,
>
> I used gdb with the gdbinit script provided by V8. So I used the command
> called "jco" with an argument of a JIT code address. So I have two
> questions listed below:
>
> 1) what is the header of each JIT code function?
> 2) where is the RelocInfo located for each JIT code function?
>
>
>
> For 1), I find that before the real code content, there is data structure
> in size of 0x60 bytes as I use gdb command to see:
>
> 0x2d88b5f04300: 0x00000ccaef902889 0x00002a97d2182a09
> 0x2d88b5f04310: 0x00002a97d2182241 0x00002a97d2182241
> 0x2d88b5f04320: 0x00002a97d2182619 0x0000080400000000
> 0x2d88b5f04330: 0x00002a97d21822d1 0x0000000600000147
> 0x2d88b5f04340: 0x0000000100000000 0xffffffffffffffff
> 0x2d88b5f04350: 0xffffffff00000000 0x0000000000000000
>
> Looks like the above byte pattern already exist prior to each code chunk.
>
> 0x2d88b5f04301: [Code]
> kind = STUB
> major_key = CEntryStub
> compiler = unknown
> Instructions (size = 327)
> 0x2d88b5f04360     0  55             push rbp
> 0x2d88b5f04361     1  4889e5         REX.W movq rbp,rsp
> 0x2d88b5f04364     4  6a06           push 0x6
> 0x2d88b5f04366     6  6a00           push 0x0
> 0x2d88b5f04368     8  49ba0143f0b5882d0000 REX.W movq r10,0x2d88b5f04301
>   ;; object: 0x2d88b5f04301 <Code STUB>
> 0x2d88b5f04372    12  4152           push r10
> ......
> RelocInfo (size = 29)
> 0x2d88b5f0436a  embedded object  (0x2d88b5f04301 <Code STUB>)
> 0x2d88b5f04379  external reference (Isolate::c_entry_fp_address)
> (0x42a21a8)
> 0x2d88b5f04386  external reference (Isolate::context_address)  (0x42a2138)
> 0x2d88b5f04393  external reference (Isolate::c_function_address)
> (0x42a21b8)
> ......
>
> For 2), looks like the above info does not exist in JIT code page.
>
> Thanks.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Jakob Gruber

Software Engineer

jgru...@google.com

Google Germany GmbH

Erika-Mann-Straße 33

80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg

Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten
haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter,
löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen,
dass die E-Mail an die falsche Person gesendet wurde.


This e-mail is confidential. If you received this communication by mistake,
please don't forward it to anyone else, please erase all copies and
attachments, and please let me know that it has gone to the wrong person.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to