From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14566 invoked by alias); 4 Feb 2011 18:58:36 -0000 Received: (qmail 14551 invoked by uid 22791); 4 Feb 2011 18:58:35 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Feb 2011 18:58:30 +0000 Received: (qmail 24584 invoked from network); 4 Feb 2011 18:58:28 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Feb 2011 18:58:28 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch 2/2] Speed up JIT support Date: Fri, 04 Feb 2011 18:58:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-25-generic; KDE/4.5.1; x86_64; ; ) Cc: Paul Pluzhnikov , vegorov@chromium.org References: <20110203214614.5FD74190A4E@elbrus2.mtv.corp.google.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201102041858.27414.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00089.txt.bz2 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 > > * 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