From: Yao Qi <yao@codesourcery.com>
To: Doug Evans <dje@google.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/3] change gdbserver to use hashtab: list->table
Date: Sat, 25 Jan 2014 12:29:00 -0000 [thread overview]
Message-ID: <52E3ADB8.60707@codesourcery.com> (raw)
In-Reply-To: <yjt27g9oeuft.fsf@ruffy.mtv.corp.google.com>
On 01/25/2014 09:12 AM, Doug Evans wrote:
> [In one perf experiment of attach/detach repeated 20 times on a
> program with 1000 threads, the time as measured by gprof went from
> 45sec to 5sec.]
>
> I created a testcase for our perf testsuite but the results there
> don't show the speed as impressively because it can only measure gdb
> not gdbserver. I may submit it separately anyway.
Hi, Doug,
Please do that. If gdbserver becomes faster, the improvements should
be shown in the perf test result. I'd like to help on this.
>
> The patch is in 3 parts:
>
> 1) rename "list" to "table" throughout,
> rename member "entry" in some structs to "head" (for consistency)
>
> 2) misc. prepatory cleanup, in particular while there are routines
> to traverse the lists, some code traverses the list itself.
> These need to be rewritten to always use the provided traversal
> routines.
>
> 3) Add hashtable support.
Where is patch 3/3? I don't see it in archive either.
>
> 2014-01-24 Doug Evans <dje@google.com>
>
> * inferiors.h (struct inferior_table): Renamed from struct
> inferior_list. All uses updated.
> (struct inferior_table_entry): Renamed from struct
> inferior_list_entry. All uses updated.
> (add_inferior_to_table): Renamed from add_inferior_to_list.
> * inferiors.c (*): Update.
Do we need entries like this? Since "All uses updated" is written
above, probably we don't need these entries. In gnu coding standards:
"When you change the calling sequence of a function in a simple
fashion, and you change all the callers of the function to use the new
calling sequence, there is no need to make individual entries for all
the callers that you changed. Just write in the entry for the function
being called, âAll callers changedâ"
Probably, we can apply this rule here too.
> (add_inferior_to_table): Renamed from add_inferior_to_list.
> All callers updated.
> * dll.c (*): Update.
> * dll.h (*): Update.
> (struct dll_info): Member "entry" renamed to "head".
> * gdbthread.h (*): Update.
> (struct thread_info): Member "entry" renamed to "head".
> * linux-aarch64-low.c (*): Update.
> * linux-arm-low.c (*): Update.
> * linux-low.c (*): Update.
> * linux-low.h (*): Update.
> * linux-mips-low.c (*): Update.
> * linux-x86-low.c (*): Update.
> * regcache.c (*): Update.
> * regcache.h (*): Update.
> * server.c (*): Update.
> * thread-db.c (*): Update.
> * tracepoint.c (*): Update.
> * win32-low.c (*): Update.
--
Yao (é½å°§)
next prev parent reply other threads:[~2014-01-25 12:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-25 1:12 Doug Evans
2014-01-25 12:29 ` Yao Qi [this message]
2014-01-26 1:48 ` Yao Qi
2014-01-26 23:01 ` Doug Evans
2014-01-29 5:45 ` Doug Evans
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=52E3ADB8.60707@codesourcery.com \
--to=yao@codesourcery.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.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