* [PATCH] sim: enable hw_tree_delete in sim_hw_uninstall
@ 2010-12-31 22:25 Mike Frysinger
2011-01-12 21:28 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2010-12-31 22:25 UTC (permalink / raw)
To: gdb-patches; +Cc: toolchain-devel
I can't find any history for why the call to hw_tree_delete is commented
out, and the VCS history shows that this goes back to the original import
in 2009. I did find some vague reference to it from 2000 (pretty close
to the original import of code), but no actual details.
Without this call, every new instance of the sim results in all old
previously allocated resources being leaked. With some devices, this
isn't just memory, it's things like open file descriptors or mmaps.
So if there are pending issues with this, I'd rather we get the sims
sorted out rather than continuing to leak this stuff. Especially since
the "let's wait for the sims to fix themselves" hasn't actually happened
in the last 10+ years.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-12-31 Mike Frysinger <vapier@gentoo.org>
* sim-hw.c (sim_hw_uninstall): Uncomment hw_tree_delete.
---
sim/common/sim-hw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sim/common/sim-hw.c b/sim/common/sim-hw.c
index e946f67..9f37145 100644
--- a/sim/common/sim-hw.c
+++ b/sim/common/sim-hw.c
@@ -318,7 +318,7 @@ sim_hw_init (struct sim_state *sd)
static void
sim_hw_uninstall (struct sim_state *sd)
{
- /* hw_tree_delete (STATE_HW (sd)->tree); */
+ hw_tree_delete (STATE_HW (sd)->tree);
free (STATE_HW (sd));
STATE_HW (sd) = NULL;
}
--
1.7.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] sim: enable hw_tree_delete in sim_hw_uninstall
2010-12-31 22:25 [PATCH] sim: enable hw_tree_delete in sim_hw_uninstall Mike Frysinger
@ 2011-01-12 21:28 ` Joel Brobecker
2011-01-12 23:16 ` Mike Frysinger
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2011-01-12 21:28 UTC (permalink / raw)
To: Mike Frysinger; +Cc: gdb-patches, toolchain-devel
> So if there are pending issues with this, I'd rather we get the sims
> sorted out rather than continuing to leak this stuff. Especially since
> the "let's wait for the sims to fix themselves" hasn't actually happened
> in the last 10+ years.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>
> 2010-12-31 Mike Frysinger <vapier@gentoo.org>
>
> * sim-hw.c (sim_hw_uninstall): Uncomment hw_tree_delete.
Given the lack of comments, it's probable that no one knows or
remembers. I'd say, go for it, and see if something breaks...
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sim: enable hw_tree_delete in sim_hw_uninstall
2011-01-12 21:28 ` Joel Brobecker
@ 2011-01-12 23:16 ` Mike Frysinger
0 siblings, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2011-01-12 23:16 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches, toolchain-devel
[-- Attachment #1: Type: Text/Plain, Size: 846 bytes --]
On Wednesday, January 12, 2011 16:24:31 Joel Brobecker wrote:
> > So if there are pending issues with this, I'd rather we get the sims
> > sorted out rather than continuing to leak this stuff. Especially since
> > the "let's wait for the sims to fix themselves" hasn't actually happened
> > in the last 10+ years.
> >
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> >
> > 2010-12-31 Mike Frysinger <vapier@gentoo.org>
> >
> > * sim-hw.c (sim_hw_uninstall): Uncomment hw_tree_delete.
>
> Given the lack of comments, it's probable that no one knows or
> remembers. I'd say, go for it, and see if something breaks...
it hasnt caused any `make check-sim` regressions for me for:
arm avr bfin cris frv iq2000 lm32 m32c mips mn10300 ppc rx sh v850
cr16 h8300 m32r moxie sh64
so i've committed it. thanks !
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-12 22:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-31 22:25 [PATCH] sim: enable hw_tree_delete in sim_hw_uninstall Mike Frysinger
2011-01-12 21:28 ` Joel Brobecker
2011-01-12 23:16 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox