Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Paul Pluzhnikov <ppluzhnikov@google.com>, vegorov@chromium.org
Subject: Re: [patch 2/2] Speed up JIT support
Date: Fri, 04 Feb 2011 18:58:00 -0000	[thread overview]
Message-ID: <201102041858.27414.pedro@codesourcery.com> (raw)
In-Reply-To: <AANLkTimcuse=gw-9BQe6sts2qDv3MeDEWtYbr1VEg5JS@mail.gmail.com>

On Friday 04 February 2011 21:58:06, Paul Pluzhnikov wrote:

> This is the second part of the JIT speedup patch (applies on top of the
> first patch).
> 
> I vaguely remember (but can't find a reference) that there is no CORE_ADDR
> that is guaranteed to always be invalid, and so my use of -1 for
> INVALID_CORE_ADDR may be problematic.

Yeah... In this case, I don't think it's problematic, but
it's certainly bad practice to assume -1 or 0 are special.
The "right" way to do this is to use an auxiliary variable
recording for example 'looked up' | 'looked up and
not found' | 'looked up and valid'.  Different states, but
see for example frame.h:struct frame_info->stack_addr|stack_addr_p.

Please don't be shy in documenting each field of
new structures.

> 2010-02-03  Paul Pluzhnikov  <ppluzhnikov@google.com>
> 
> 	* breakpoint.c (longjmp_names): New variable.
> 	(struct breakpoint_objfile_data): New type.
> 	(breakpoint_objfile_key): New variable.
> 	(get_breakpoint_objfile_data): New function.
> 	(create_overlay_event_breakpoint): Adjust.
> 	(create_longjmp_master_breakpoint): Adjust.
> 	(create_std_terminate_master_breakpoint): Adjust.
> 	(create_exception_master_breakpoint): Adjust.
> 	(_initialize_breakpoint): Adjust.

Please expands those "Adjust"s a bit...  Examples:

...
	(create_exception_master_breakpoint): Check per-objfile cache
   for symbols first.
	(_initialize_breakpoint): Register per-objfile data key.
...

Otherwise looks okay to me.

-- 
Pedro Alves


  reply	other threads:[~2011-02-04 18:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 21:46 [patch 1/2] " Paul Pluzhnikov
2011-02-03 21:58 ` [patch 2/2] " Paul Pluzhnikov
2011-02-04 18:58   ` Pedro Alves [this message]
2011-02-04 20:17   ` Tom Tromey
2011-02-04 20:33     ` Paul Pluzhnikov
2011-02-05  0:26       ` Paul Pluzhnikov
2011-02-07 15:31         ` Tom Tromey
2011-02-15 21:56           ` Paul Pluzhnikov
2011-02-04 18:28 ` [patch 1/2] " Pedro Alves
2011-02-04 20:00 ` Tom Tromey

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=201102041858.27414.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ppluzhnikov@google.com \
    --cc=vegorov@chromium.org \
    /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