Re[8]: [Gc] Boehm GC and Iphone

Ivan Maidanski ivmai at mail.ru
Mon Jan 17 22:56:26 PST 2011


Hi,

Tue, 18 Jan 2011 03:24:33 -0300 Damian <damian.pop at gmail.com>:

> Hi Ivan, thanks for helping me with this.
> 1. I defined none of those, should I define any? (I tried both after I read
> this but I get the same exception)

So, the problem is not there.

> 2. My app only runs on iphone, but I tried it in the iphone simulator and it
> does not crash. I built the gc just like for the simulator but for x86
> arch and it seems to work.

> 3. How? How do I build the collector with symbols on? I tried adding -g to
> compiler options and I get a library more than twice bigger so I thing it
> has the symbols, but when debugging the stack is the same.

I don't know. At least, try to set a break point at exc_sever and watch what is passed to it.

Regards.

> 
> Thanks again!
> Damian
> 
> 2011/1/17 Ivan Maidanski <ivmai at mail.ru>
> 
> > Hi Damian,
> >
> > 1. Is the mode is GC_DISCOVER_TASK_THREADS or GC_NO_THREADS_DISCOVERY?
> > 2. Could you try your app on Mac OS X?
> > 3. Could you debug with symbols on and tell us the reason of abort call?
> > 4. GC_get_parallel() returns non-zero if 2 or more markers are running.
> > 5. Incremental/generation mode is turned on only if either
> > GC_enable_incremental() is called (unless GC_DISABLE_INCREMENTAL env var is
> > set) or GC_ENABLE_INCREMENTAL env var is set.
> >
> > Regards.
> >
> > Sun, 16 Jan 2011 01:18:05 -0300 Damian <damian.pop at gmail.com>:
> >
> > > Well, I was not calling gc_enable_incremental() so I think it was not
> > > enabled.
> > > Now I added the call but the program execution is aborted with this stack
> > > trace:
> > >
> > > #0  0x31cbcffc in __abort ()
> > >
> > > #1  0x31cbd04c in abort ()
> > >
> > > #2  0x31c91fcc in internal_catch_exception_raise ()
> > >
> > > #3  0x31c81ea4 in _Xexception_raise ()
> > >
> > > #4  0x31c81ab0 in exc_server ()
> > >
> > > #5  0x00060f20 in GC_mprotect_thread ()
> > >
> > > #6  0x31caa284 in _pthread_start ()
> > >
> > > #7  0x31c9f2b0 in thread_start ()
> > >
> > >
> > > Any help?
> > > Thanks!
> > >
> > >
> > > On Sat, Jan 15, 2011 at 8:14 PM, Damian <damian.pop at gmail.com> wrote:
> > >
> > > > Hi, I've just built gc7.2 BDWGC for iphone device, and it's working.
> > > > How can I make sure that generation mode is on and working?
> > > > And, parallel mark doesn't work on single core cpus?
> > > >
> > > > Damian.
> > > >
> > > > 2011/1/13 Ivan Maidanski <ivmai at mail.ru>
> > > >
> > > >> Hi,
> > > >>
> > > >> If the platform is not multi-core then parallel-mark mode should be
> > off
> > > >> (either at compile time or at runtime).
> > > >> But turning on generation mode could reduce the GC pause on a
> > single-core.
> > > >>
> > > >> Regards.
> > > >>
> > > >> Thu, 13 Jan 2011 08:28:55 -0300 Damian <damian.pop at gmail.com>:
> > > >> > None is multicore. Will I get an inprovement anyway?
> > > >> > Ok, I will try to compile gc7.2 BDWGC snapshot tonight.
> > > >> > Thanks!
> > > >> >
> > > >> > 2011/1/13 Ivan Maidanski <ivmai at mail.ru>
> > > >> >
> > > >> > > Hi,
> > > >> > >
> > > >> > > 1. Are you going to run it on a multi-core? (I don't know Apples
> > > >> devices
> > > >> > > internals deeply, so I wonder which of them have multi-core CPUs).
> > > >> > >
> > > >> > > 2. If you start using gc6.8 just because of the reason you
> > mentioned,
> > > >> I
> > > >> > > recommend you to migrate to gc7.2 (get the recent BDWGC snapshot
> > which
> > > >> now
> > > >> > > has generation plus parallel collection enabled).
> > > >> > >
> > > >> > > 3. Incremental/generation collection as well as parallel marking
> > are
> > > >> the GC
> > > >> > > improvements aiming collection pause reduction.
> > > >> > >
> > > >> > > Regards.
> > > >> > >
> > > >> > > Wed, 12 Jan 2011 20:03:02 -0300 Damian <damian.pop at gmail.com>:
> > > >> > >
> > > >> > > > Maybe concurrent + parallel collection does not what I'm
> > expecting.
> > > >> > > > What I need to achieve is to reduce the collection pause.
> > > >> > > > I'm using version 6.8 (because I've found somewhere on the
> > internet
> > > >> > > someone
> > > >> > > > has made it work on iphone with some changes) and I'm having
> > > >> collection
> > > >> > > > cycles of about 120ms. I need to reduce that number. I don't
> > care if
> > > >> > > overall
> > > >> > > > collection time increases as long as the app is not freezed for
> > such
> > > >> a
> > > >> > > long
> > > >> > > > time.
> > > >> > > > Is that possible?
> > > >> > > >
> > > >> > > > Thanks.
> > > >> > > >
> > > >> > > > 2011/1/12 Ivan Maidanski <ivmai at mail.ru>
> > > >> > > >
> > > >> > > > > Hi,
> > > >> > > > >
> > > >> > > > > BTW What Apple devices has a multi-core CPU at present?
> > > >> > > > >
> > > >> > > > > I ran GC test on a single-core with GC_MARKERS=4 - collector
> > > >> appears to
> > > >> > > > > work...
> > > >> > > > >
> > > >> > > > > Wed, 12 Jan 2011 10:04:00 -0300 Damian <damian.pop at gmail.com
> > >:
> > > >> > > > >
> > > >> > > > > > Hi,
> > > >> > > > > > Is it possible to compile boehm gc for iphone enabling
> > > >> generational
> > > >> > > and
> > > >> > > > > parallel collection?
> > > >> > > > >
> > > >> > > > > See the recent post by Hans.
> > > >> > > > >
> > > >> > > > > I try to enable generational collection on multi-cores
> > (regardless
> > > >> > > whether
> > > >> > > > > this slows down the GC in average or not - anyway it is not on
> > by
> > > >> > > default).
> > > >> > > > > FYI: At present, generational collection on multi-cores
> > enabled
> > > >> only on
> > > >> > > > > Win32.
> > > >> > > > >
> > > >> > > > > Regards.
> > > >> > > > >
> > > >> > > > > > I will try to do so; probably I will need help, but for now
> > al
> > > >> least
> > > >> > > I
> > > >> > > > > want to know it it's possible at all.
> > > >> > > > > > Thanks
> >
> >
> 
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/



More information about the Gc mailing list