Re: performance of multithreading gets gradually worse under gdb

Tom Tromey
2011-02-04T15:26:27Z

Pedro> Yeah. And only clear current_regcache_ptid if it was deleted in the
Pedro> first place; and only reinit the frame cache if we deleted the
Pedro> regcache of inferior_ptid ? Like the patch below.

Yeah, this looks reasonable to me.

Pedro> We have targets that do thread<->lwp ptid translation between
Pedro> thread/proc stratum layers, and random places that do
Pedro> get_thread_regcache (ptid) behind the core's back -- it appears
Pedro> aix-thread.c could be one of those.
Pedro> Another example: linux-nat.c:cancel_breakpoint builds
Pedro> regcaches for lwps before linux-thread-db.c (if active at all)
Pedro> has had a chance of telling the core about new
Pedro> threads (in all-stop mode).

Thanks for pointing this out. I have a lot to learn in this area.

One somewhat distressing thing is that my patch did not cause any
regressions.

Tom