Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Vyacheslav Egorov <vegorov@chromium.org>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb@sourceware.org
Subject: Re: JIT interface slowness
Date: Fri, 31 Dec 2010 23:12:00 -0000	[thread overview]
Message-ID: <AANLkTimp_X92h4uXAS3fm=BSLSej-pD69Tkk=TowzYp_@mail.gmail.com> (raw)
In-Reply-To: <201012312222.54063.pedro@codesourcery.com>

On Fri, Dec 31, 2010 at 11:22 PM, Pedro Alves <pedro@codesourcery.com> wrote:
> or change design to make it so you have fewer objects.

Yep, this is the most obvious optimization to pursue and I am already
tried to figure out some way of merging ELF-objects for different code
objects together. Unfortunately it is not easy due to the lazy nature
of JIT compilation.

>
> If your JIT runs on a separate thread, and pausing just that
> thread doesn't block all others immediately, you could try
> running gdb in non-stop mode.
>

I thought you said that hitting __jit_debug_register_code stops the
world i.e. stops all threads. If this is not the case I can just form
a queue on my side and let a separate thread poll it and register
incoming elf-objects (in V8 compilation and execution are performed in
the same thread).

> What was the cost for a first registrations?

Up to 88 it is < 2ms
Up to 276 --- < 10ms
Up to 535 --- < 50ms

> is this native debugging, or remote debugging?

native

> What's the elf object's or debug info's size?

for ia32 below 1k. average seems to be 600 bytes.

Contents are (in addition to standard ELF header, section table,
string table for section table):

.text section: type = NOBITS, address = start of JIT emitted code
object, size = size of JIT emitted code object
.symtab section: 2 symbols, one of type FILE with local binding, one
of type FUNC with global binding and the name equal to name of JIT
emitted code object.

plus for code objects with available line information:

.debug_info section with one compilation unit, .debug_abbrev section
with one abbreviation corresponding to compilation unit from
.debug_info, .debug_line with DWARF2 encoded line information.

--
Vyacheslav Egorov


  reply	other threads:[~2010-12-31 23:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-31 19:43 Vyacheslav Egorov
2010-12-31 20:10 ` Pedro Alves
2010-12-31 21:39   ` Vyacheslav Egorov
2010-12-31 22:23     ` Pedro Alves
2010-12-31 23:12       ` Vyacheslav Egorov [this message]
2010-12-31 23:36         ` Pedro Alves
2011-01-02  7:54           ` Paul Pluzhnikov
2011-01-03 10:44             ` Vyacheslav Egorov
2011-01-03 17:32               ` Paul Pluzhnikov
2011-01-03 22:01                 ` Paul Pluzhnikov
2011-01-03 23:32                   ` Pedro Alves
2011-01-03 23:40                     ` Pedro Alves
2011-01-03 23:47                     ` Paul Pluzhnikov
2011-01-04  0:13                       ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTimp_X92h4uXAS3fm=BSLSej-pD69Tkk=TowzYp_@mail.gmail.com' \
    --to=vegorov@chromium.org \
    --cc=gdb@sourceware.org \
    --cc=pedro@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox