Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » How to garbage collect obsolete plugin versions?
How to garbage collect obsolete plugin versions? [message #132454] Mon, 08 June 2009 13:52 Go to next message
Eclipse UserFriend
Originally posted by: eclipse-newsgroups.scharf.gr

Hi,

Garbage Collections seems to be one of the concepts of p2:
http://wiki.eclipse.org/Equinox/p2/Concepts

I have lots of different versions of plugins in my installation,
how do I garbage collect them?


Michael
--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/
Re: How to garbage collect obsolete plugin versions? [message #132466 is a reply to message #132454] Mon, 08 June 2009 15:57 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Michael Scharf wrote:
> Hi,
>
> Garbage Collections seems to be one of the concepts of p2:
> http://wiki.eclipse.org/Equinox/p2/Concepts
>
> I have lots of different versions of plugins in my installation,
> how do I garbage collect them?

You can use the GC Application in p2.

'org.eclipse.equinox.internal.p2.garbagecollector.Applicatio n'

The argument is the profile you want to run the GC on.

I don't know if there is a better way to do this, maybe the p2 team can
shed light on this topic ;)

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: How to garbage collect obsolete plugin versions? [message #132492 is a reply to message #132454] Mon, 08 June 2009 17:05 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Garbage collection happens automatically after you've uninstalled or updated
something. What the GC worker does is goes through and deletes any of the
artifacts referenced in the bundle pool that are no longer referenced by the
current install/profile.

The application Chris mentions would allow a manual run of the GC which
might be useful in some situations but generally the automated GC should be
adequate.

I recall you using dropins and to be clear dropins are never GC'ed as these
are managed by the user. Are you seeing tons of garbage in your bundle pool?

-Simon


"Michael Scharf" <eclipse-newsgroups@scharf.gr> wrote in message
news:h0j53b$lke$1@build.eclipse.org...
> Hi,
>
> Garbage Collections seems to be one of the concepts of p2:
> http://wiki.eclipse.org/Equinox/p2/Concepts
>
> I have lots of different versions of plugins in my installation,
> how do I garbage collect them?
>
>
> Michael
> --
> Michael Scharf
> Wind River Systems GmbH
> http://www.WindRiver.com
> http://MichaelScharf.blogspot.com/
Re: How to garbage collect obsolete plugin versions? [message #132537 is a reply to message #132492] Mon, 08 June 2009 23:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-newsgroups.scharf.gr

It turns out that p2 does garbage collection (at some
point). So, now when I look into the installation
it seems quite clean. I guess some restart is
needed....

Michael

Simon Kaegi wrote:
> Garbage collection happens automatically after you've uninstalled or updated
> something. What the GC worker does is goes through and deletes any of the
> artifacts referenced in the bundle pool that are no longer referenced by the
> current install/profile.
>
> The application Chris mentions would allow a manual run of the GC which
> might be useful in some situations but generally the automated GC should be
> adequate.
>
> I recall you using dropins and to be clear dropins are never GC'ed as these
> are managed by the user. Are you seeing tons of garbage in your bundle pool?
>
> -Simon
>
>
> "Michael Scharf" <eclipse-newsgroups@scharf.gr> wrote in message
> news:h0j53b$lke$1@build.eclipse.org...
>> Hi,
>>
>> Garbage Collections seems to be one of the concepts of p2:
>> http://wiki.eclipse.org/Equinox/p2/Concepts
>>
>> I have lots of different versions of plugins in my installation,
>> how do I garbage collect them?
>>
>>
>> Michael
>> --
>> Michael Scharf
>> Wind River Systems GmbH
>> http://www.WindRiver.com
>> http://MichaelScharf.blogspot.com/
>
>


--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/
Re: How to garbage collect obsolete plugin versions? [message #132550 is a reply to message #132537] Tue, 09 June 2009 01:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-newsgroups.scharf.gr

Hmm,

I am still puzzled when the automatic GC happens.
I have a -configuration where the plugins are
not garbage collected.... I wish there was a button
to run the p2 GC...

Michael


> It turns out that p2 does garbage collection (at some
> point). So, now when I look into the installation
> it seems quite clean. I guess some restart is
> needed....
>
> Michael
>
> Simon Kaegi wrote:
>> Garbage collection happens automatically after you've uninstalled or
>> updated something. What the GC worker does is goes through and deletes
>> any of the artifacts referenced in the bundle pool that are no longer
>> referenced by the current install/profile.
>>
>> The application Chris mentions would allow a manual run of the GC
>> which might be useful in some situations but generally the automated
>> GC should be adequate.
>>
>> I recall you using dropins and to be clear dropins are never GC'ed as
>> these are managed by the user. Are you seeing tons of garbage in your
>> bundle pool?
>>
>> -Simon
>>
>>
>> "Michael Scharf" <eclipse-newsgroups@scharf.gr> wrote in message
>> news:h0j53b$lke$1@build.eclipse.org...
>>> Hi,
>>>
>>> Garbage Collections seems to be one of the concepts of p2:
>>> http://wiki.eclipse.org/Equinox/p2/Concepts
>>>
>>> I have lots of different versions of plugins in my installation,
>>> how do I garbage collect them?
>>>
>>>
>>> Michael
>>> --
>>> Michael Scharf
>>> Wind River Systems GmbH
>>> http://www.WindRiver.com
>>> http://MichaelScharf.blogspot.com/
>>
>>
>
>


--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/
Re: How to garbage collect obsolete plugin versions? [message #132562 is a reply to message #132550] Tue, 09 June 2009 05:14 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Admittedly at times I have to. Why not open a bug.
-Simon

"Michael Scharf" <eclipse-newsgroups@scharf.gr> wrote in message
news:h0kd4g$3dg$1@build.eclipse.org...
> Hmm,
>
> I am still puzzled when the automatic GC happens.
> I have a -configuration where the plugins are
> not garbage collected.... I wish there was a button
> to run the p2 GC...
>
> Michael
>
>
>> It turns out that p2 does garbage collection (at some
>> point). So, now when I look into the installation
>> it seems quite clean. I guess some restart is
>> needed....
>>
>> Michael
>>
>> Simon Kaegi wrote:
>>> Garbage collection happens automatically after you've uninstalled or
>>> updated something. What the GC worker does is goes through and deletes
>>> any of the artifacts referenced in the bundle pool that are no longer
>>> referenced by the current install/profile.
>>>
>>> The application Chris mentions would allow a manual run of the GC which
>>> might be useful in some situations but generally the automated GC should
>>> be adequate.
>>>
>>> I recall you using dropins and to be clear dropins are never GC'ed as
>>> these are managed by the user. Are you seeing tons of garbage in your
>>> bundle pool?
>>>
>>> -Simon
>>>
>>>
>>> "Michael Scharf" <eclipse-newsgroups@scharf.gr> wrote in message
>>> news:h0j53b$lke$1@build.eclipse.org...
>>>> Hi,
>>>>
>>>> Garbage Collections seems to be one of the concepts of p2:
>>>> http://wiki.eclipse.org/Equinox/p2/Concepts
>>>>
>>>> I have lots of different versions of plugins in my installation,
>>>> how do I garbage collect them?
>>>>
>>>>
>>>> Michael
>>>> --
>>>> Michael Scharf
>>>> Wind River Systems GmbH
>>>> http://www.WindRiver.com
>>>> http://MichaelScharf.blogspot.com/
>>>
>>>
>>
>>
>
>
> --
> Michael Scharf
> Wind River Systems GmbH
> http://www.WindRiver.com
> http://MichaelScharf.blogspot.com/
Re: How to garbage collect obsolete plugin versions? [message #132590 is a reply to message #132550] Tue, 09 June 2009 15:24 Go to previous message
Eclipse UserFriend
Originally posted by: dj_houghton.nospam.ca.ibm.com

I created a new bundle with an icon with the following block of code. In
fact, I just used the example SampleAction to make it even easier.

IProfileRegistry profileRegistry = (IProfileRegistry)
ServiceHelper.getService(Activator.getContext(),
IProfileRegistry.class.getName());
if (profileRegistry == null)
throw new RuntimeException("Unable to acquire the profile registry
service.");
IProfile profile = profileRegistry.getProfile("SDKProfile");
new GarbageCollector().runGC(profile);
MessageDialog.openInformation(window.getShell(), "Profile Garbage
Collector", "Profile garbage collection finished.");


Michael Scharf wrote:
> Hmm,
>
> I am still puzzled when the automatic GC happens.
> I have a -configuration where the plugins are
> not garbage collected.... I wish there was a button
> to run the p2 GC...
>
> Michael
>
>
>> It turns out that p2 does garbage collection (at some
>> point). So, now when I look into the installation
>> it seems quite clean. I guess some restart is
>> needed....
>>
>> Michael
>>
>> Simon Kaegi wrote:
>>> Garbage collection happens automatically after you've uninstalled or
>>> updated something. What the GC worker does is goes through and
>>> deletes any of the artifacts referenced in the bundle pool that are
>>> no longer referenced by the current install/profile.
>>>
>>> The application Chris mentions would allow a manual run of the GC
>>> which might be useful in some situations but generally the automated
>>> GC should be adequate.
>>>
>>> I recall you using dropins and to be clear dropins are never GC'ed as
>>> these are managed by the user. Are you seeing tons of garbage in your
>>> bundle pool?
>>>
>>> -Simon
>>>
>>>
>>> "Michael Scharf" <eclipse-newsgroups@scharf.gr> wrote in message
>>> news:h0j53b$lke$1@build.eclipse.org...
>>>> Hi,
>>>>
>>>> Garbage Collections seems to be one of the concepts of p2:
>>>> http://wiki.eclipse.org/Equinox/p2/Concepts
>>>>
>>>> I have lots of different versions of plugins in my installation,
>>>> how do I garbage collect them?
>>>>
>>>>
>>>> Michael
>>>> --
>>>> Michael Scharf
>>>> Wind River Systems GmbH
>>>> http://www.WindRiver.com
>>>> http://MichaelScharf.blogspot.com/
>>>
>>>
>>
>>
>
>
Previous Topic:eclipse equinox bundle compile problem
Next Topic:[p2IU fetch] Ability to fetch a group of bundles
Goto Forum:
  


Current Time: Fri Apr 19 01:49:55 GMT 2024

Powered by FUDForum. Page generated in 0.01892 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top