[Gc] Running Boehm-Demers-Weiser gc on a simulator

Boehm, Hans hans.boehm at hp.com
Wed Nov 29 11:53:47 PST 2006


If you haven't done so already, have a look at the last section in
http://www.hpl.hp.com/personal/Hans_Boehm/gc/debugging.html .

It sounds like it's also worth checking specifically that stacks are
traced.  Assuming that this a single-threaded application, and you are
using gc6.8 built without thread support, step through
GC_push_current_stack() to make sure it's doing the right thing.

What's the simulated architecture?  Could it be a value that's only in a
register that is not being traced?

Hans

> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Jiwon Seo
> Sent: Wednesday, November 29, 2006 12:17 AM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] Running Boehm-Demers-Weiser gc on a simulator
> 
> Hi,
> 
> I'm trying to run Boehm-Demers-Weiser gc on a simulator for a 
> research. I needed to make some modification for the gc to 
> run on the simulator, but I think there's more to do since it 
> segfaults after mark&collect is finished. I'll explain what 
> I've done to make sure I've done (almost) all that's necessary.
> 
> Since it's running on a simulator, not all the pointers in 
> the data segment are client program but part of them are 
> simulator itself's.
> So, I've wrote a linker script to divide client area and 
> simulator area for .data, .bss, .sbss, .sdata segment and 
> push only what's in the client area. Also I've specified 
> stack bottom with GC_stackbottom right after running the 
> client program (and before calling GC_init)
> 
> The problem is, it still does not work - specifically after 
> stop-the-world mark&collect phase it segfaults (not right after it
> though) A field of an object pointed by stack variable has a 
> wrong value, and I think it's because the marker does not 
> mark all the reachable objects. I'm really stuck here, so can 
> anyone give me pointers to start debug things?
> 
> Following is the result of GC_dump() (+stat information) for 
> both the app running on the simulator and running on the 
> machine directly. Of course it runs okay on the real machine.
> 
> 
> ------------------------------------> running on the simulator
> <---------------------------------------------------
> ***Static roots:
> ============= GC_print_static_roots ==============
> >From 10b280e0 to 10c29860  (temporary)
> >From 10c317dc to 10c4f110  (temporary)
> >From 10c50118 to 10c56318  (temporary)
> >From 10c58140 to 10c64d60  (temporary)
> Total size: 1253076
> =======================================
> 
> 
> ***Heap sections:
> Total heap size: 831488
> Section 0 from 0xb3460008 to 0xb3470008 0/16 blacklisted 
> Section 1 from 0xb3480008 to 0xb3490008 0/16 blacklisted 
> Section 2 from 0xb3490008 to 0xb34a0008 0/16 blacklisted 
> Section 3 from 0xb34a0008 to 0xb34b3008 0/19 blacklisted 
> Section 4 from 0xb34b3008 to 0xb34cd008 0/26 blacklisted 
> Section 5 from 0xb34cd008 to 0xb3505008 2/56 blacklisted 
> Section 6 from 0xb3515008 to 0xb354b008 0/54 blacklisted
> 
> ***Free blocks:
> Total of 0 bytes on free list
> 
> ***Blocks in use:
> (kind(0=ptrfree,1=normal,2=unc.,4=stubborn):size_in_bytes, 
> #_marks_set) 
> (0:8,509)(0:16,245)(1:16,239)(1:8,181)(1:24,118)(1:88,44)(0:8,
> 7)(1:80,1)(0:3832,0)(0:8208,1)(0:3832,0)(0:3832,0)(0:3840,0)(0
> :3840,0)(0:8208,0)(0:3832,0)(0:3840,0)(0:3840,0)(0:8208,0)(0:5
> 6,40)(1:8,0)(1:96,0)(1:2112,0)(0:24,11)(0:32,90)(1:8,0)(0:8,0)
> (1:2048,0)(1:1360,0)(0:16,2)(0:512,0)(1:1024,0)(1:8,0)(1:56,0)
> (0:8,0)(0:72,14)(0:24,0)(0:312,0)(0:152,0)(0:15656,0)(0:16400,
> 0)(1:16,5)(0:7472,0)(0:8208,0)(0:8200,0)(0:8200,0)(0:8200,0)(0
> :8208,0)(0:8200,0)(0:8200,0)(0:8208,0)(1:8,1)(1:136,8)(0:80,0)
> (0:8,6)(1:98312,0)(1:2048,0)(0:680,0)(1:8,33)(1:1360,0)(0:368,
> 0)(0:24,1)(1:1024,0)(1:680,0)(0:16,0)(0:8,0)(1:512,0)(0:208,0)
> (1:368,0)(1:312,0)(1:8,1)(1:272,0)(1:208,0)(0:1024,0)(0:128,0)
> (0:272,0)(0:96,0)(0:112,0)(0:14184,0)(0:512,0)(0:184,1)(0:1640
> 0,0)(0:8208,0)(0:8200,1)(0:8200,0)(0:8200,0)(0:6000,0)(0:8208,
> 0)(1:2056,0)(1:152,1)(0:8200,0)(0:8200,0)(0:8208,0)(1:24,6)(1:
> 16,20)(1:8,73)(0:8,14)(1:16,2)(1:8,12)(1:80,6)(1:80,8)(1:24,5)
> (0:8,1)(1:64,0)(0:80,0)(0:64,7)(1:16,0)(1:8,0)(0:56,6)(1:40!
> ,8)(0:48,7)(1:32,3)(1:96,2)(1:112,1)(0:16,8)(1:152,0)(0:8,1)(1
> :48,3)(1:16,2)(1:80,1)(1:24,3)(0:32,1)(0:40,7)(0:24,2)(1:8,36)
> blocks = 125, bytes = 831488
> 
> ***Finalization statistics:
> 0 finalization table entries; 0 disappearing links 0 objects 
> are eligible for immediate finalization Immediately reclaimed 
> 438216 bytes in heap of size 831488 bytes
> 
> 
> --------------------> this is dump of proper one(running on the
> machine) <------------------
> ***Static roots:
> >From 0x1024b000 to 0x10377f40  (temporary) From 0xff97aac to 
> 0xffa4c20  
> >(temporary) From 0xfe2ccb4 to 0xfe322d8  (temporary) From 
> 0xf1e2c9c to 
> >0xf1e51c8  (temporary) From 0xf1b37b0 to 0xf1b3ce0  (temporary) From 
> >0xf7fab614 to 0xf7fb219c  (temporary) From 0xfd52e28 to 0xfd5307c  
> >(temporary) From 0xffed768 to 0xffee6b0  (temporary)
> Total size: 1351256
> 
> ***Heap sections:
> Total heap size: 831488
> Section 0 from 0x103a0000 to 0x103b0000 0/16 blacklisted 
> Section 1 from 0x103c0000 to 0x103d0000 0/16 blacklisted 
> Section 2 from 0x103d0000 to 0x103e0000 0/16 blacklisted 
> Section 3 from 0x103e0000 to 0x103f3000 0/19 blacklisted 
> Section 4 from 0x103f3000 to 0x1040e000 0/27 blacklisted 
> Section 5 from 0x1040e000 to 0x10446000 0/56 blacklisted 
> Section 6 from 0x10456000 to 0x1048b000 0/53 blacklisted
> 
> ***Free blocks:
> Total of 0 bytes on free list
> 
> ***Blocks in use:
> (kind(0=ptrfree,1=normal,2=unc.,4=stubborn):size_in_bytes, 
> #_marks_set) 
> (1:98308,1)(0:112,6)(0:512,5)(0:184,6)(0:14344,0)(0:16396,0)(0
> :6160,0)(0:8204,0)(0:8196,0)(0:8196,0)(0:8200,0)(0:8204,0)(1:2
> 052,1)(0:8196,0)(0:8200,0)(0:8204,0)(0:80,19)(1:152,4)(1:24,28
> )(1:16,48)(1:8,72)(0:8,9)(1:16,3)(1:8,9)(1:80,31)(1:80,6)(1:24
> ,5)(0:8,0)(1:64,5)(0:80,0)(1:16,0)(0:64,4)(1:8,0)(0:56,6)(0:48
> ,5)(1:32,15)(1:96,38)(1:112,12)(0:16,21)(1:40,29)(1:152,3)(0:8
> ,0)(1:48,11)(1:80,1)(1:24,1)(0:32,58)(0:40,16)(0:24,57)(1:8,20
> )(1:16,4)(1:8216,1)(1:88,46)(0:80,51)(0:8,270)(0:56,72)(1:80,3
> )(0:3892,0)(0:8204,0)(0:3892,0)(0:3892,0)(0:3896,0)(0:3900,0)(
> 0:8204,0)(0:3892,0)(0:3896,0)(0:3900,0)(0:8204,0)(1:8,129)(1:9
> 6,5)(1:2108,0)(0:24,106)(1:8,60)(0:8,16)(1:2048,0)(0:32,109)(1
> :1360,0)(0:16,129)(1:1024,0)(1:8,103)(1:56,2)(0:8,12)(0:24,104
> )(0:312,3)(0:152,2)(0:15832,0)(0:16396,0)(0:7648,0)(0:8204,0)(
> 0:8196,0)(0:8196,0)(0:8200,0)(0:8204,0)(1:16,150)(0:8196,0)(0:
> 8200,0)(0:8204,0)(1:8,113)(1:136,17)(0:8,12)(1:2048,0)(0:680,3
> )(1:8,85)(1:1360,0)(0:72,21)(0:368,5)(0:24,84)(1:1024,0)(1:!
> 680,0)(1:512,0)(0:16,129)(0:8,14)(1:448,0)(0:448,6)(0:208,5)(1
> :368,0)(1:312,0)(1:8,108)(1:272,0)(1:208,0)(0:1024,1)(0:128,4)
> (0:272,6)(0:96,29)
> blocks = 123, bytes = 831488
> 
> ***Finalization statistics:
> 0 finalization table entries; 0 disappearing links 0 objects 
> are eligible for immediate finalization Immediately reclaimed 
> 254648 bytes in heap of size 831488 byte
> 
> _______________________________________________
> 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