July 02, 2010 [Issue 3463] Integrate Precise Heap Scanning Into the GC | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | http://d.puremagic.com/issues/show_bug.cgi?id=3463 bearophile_hugs@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs@eml.cc --- Comment #20 from bearophile_hugs@eml.cc 2010-07-02 05:28:18 PDT --- I think they are busy doing other things. It's good to find a way to make built-in AAs too precise. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 02, 2010 [Issue 3463] Integrate Precise Heap Scanning Into the GC | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | http://d.puremagic.com/issues/show_bug.cgi?id=3463 --- Comment #21 from Leandro Lucarella <llucax@gmail.com> 2010-07-02 05:41:22 PDT --- I care! But I guess that if I'm the only one you are wasting your time :) I'd suggest to bring it up in the DMD (or even druntime, but I guess that one is D2-only) devel list: http://lists.puremagic.com/mailman/listinfo/dmd-internals Other lists: http://lists.puremagic.com/mailman/listinfo -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 02, 2010 [Issue 3463] Integrate Precise Heap Scanning Into the GC | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | http://d.puremagic.com/issues/show_bug.cgi?id=3463 Rob Jacques <sandford@jhu.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sandford@jhu.edu --- Comment #22 from Rob Jacques <sandford@jhu.edu> 2010-07-02 07:00:20 PDT --- I also care. Keep up the good work :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 02, 2010 [Issue 3463] Integrate Precise Heap Scanning Into the GC | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | http://d.puremagic.com/issues/show_bug.cgi?id=3463 Andrei Alexandrescu <andrei@metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrei@metalanguage.com --- Comment #23 from Andrei Alexandrescu <andrei@metalanguage.com> 2010-07-02 09:40:25 PDT --- I just voted for it. It would be great if you could define some benchmarks by which you assess the improvements your approach is bringing. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 03, 2010 [Issue 3463] Integrate Precise Heap Scanning Into the GC | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | http://d.puremagic.com/issues/show_bug.cgi?id=3463 --- Comment #24 from David Simcha <dsimcha@yahoo.com> 2010-07-02 18:29:07 PDT --- I'm thoroughly impressed. Now that someone wrote a better patch than I did, with some of the plumbing issues resolved, I wish I could just use all 10 votes on it. Then again, I've gotten to the point where I'm good at working around the conservativeness of the GC. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 04, 2010 [Issue 3463] Integrate Precise Heap Scanning Into the GC | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | http://d.puremagic.com/issues/show_bug.cgi?id=3463 --- Comment #25 from Leandro Lucarella <llucax@gmail.com> 2010-07-04 08:05:15 PDT --- (In reply to comment #23) > I just voted for it. It would be great if you could define some benchmarks by which you assess the improvements your approach is bringing. I will try to do a couple of benchmarks when I have the time, but I think the DMD-part of the patch should be merged, even if the current GC is slower with the precise scanning, because having info on the pointers locations open a lot of new possibilities GC-wise, like moving collectors. This can be explored in the feature, once the compiler provide the necessary information about types to the GC. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 18, 2010 [Issue 3463] Integrate Precise Heap Scanning Into the GC | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | http://d.puremagic.com/issues/show_bug.cgi?id=3463 --- Comment #26 from nfxjfg@gmail.com 2010-07-18 14:20:24 PDT --- @Sean Kelly: you said something about different ways of storing the mask. Do you have any more concrete suggestions? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 21, 2010 [Issue 3463] Integrate Precise Heap Scanning Into the GC | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | http://d.puremagic.com/issues/show_bug.cgi?id=3463 --- Comment #27 from Leandro Lucarella <llucax@gmail.com> 2010-07-20 19:33:05 PDT --- I'm trying to test this patch but I'm having some problems compiling Tango (I'm using 0.99.9, not trunk). With the patched DMD, I get this error: dmd: mtype.c:5671: void PointerMap::pointer(size_t): Assertion `offset < m_size' failed. Compiling the file: tango/util/digest/MerkleDamgard.d Here is some output from a GDB session: (gdb) bt #0 0x00002b421bf3c175 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00002b421bf3ef80 in *__GI_abort () at abort.c:92 #2 0x00002b421bf352b1 in *__GI___assert_fail (assertion=0x58be62 "offset < m_size", file=<value optimized out>, line=5671, function=0x58bea0 "void PointerMap::pointer(size_t)") at assert.c:81 #3 0x00000000004f5d55 in PointerMap::pointer (this=0x7fff15974fc0, offset=20) at mtype.c:5671 #4 0x00000000004eaf15 in TypeDArray::fillPointerMap (this=0x11735e0, pm=0x7fff15974fc0, offset=12) at mtype.c:2241 #5 0x00000000004679d4 in VarDeclaration::fillPointerMap (this=0x1130700, pm=0x7fff15974fc0, a_offset=0) at declaration.c:1379 #6 0x000000000040488b in AttribDeclaration::fillPointerMap (this=0x11307c0, pm=0x7fff15974fc0, offset=0) at attrib.c:289 #7 0x0000000000542327 in ClassDeclaration::toObjFile (this=0x1130150, multiobj=0) at toobj.c:484 #8 0x0000000000404689 in AttribDeclaration::toObjFile (this=0x113afd0, multiobj=0) at attrib.c:240 #9 0x00000000004c0da1 in Module::genobjfile (this=0x112bfd0, multiobj=0) at glue.c:267 #10 0x00000000004e1560 in main (argc=13, argv=0x111f930) at mars.c:1285 (gdb) list 5666 * Actually does nothing if the offset isn't aligned. 5667 */ 5668 5669 void PointerMap::pointer(size_t offset) 5670 { 5671 assert(offset < m_size); 5672 //reject unaligned pointers 5673 if (offset % sizeof(size_t)) 5674 return; 5675 size_t bitpos = offset / sizeof(size_t); (gdb) print offset $1 = 20 (gdb) print m_size $2 = 20 (gdb) up #4 0x00000000004eaf15 in TypeDArray::fillPointerMap (this=0x11735e0, pm=0x7fff15974fc0, offset=12) at mtype.c:2241 2241 pm->pointer(offset + sizeof(size_t)); (gdb) list 2236 } 2237 2238 void TypeDArray::fillPointerMap(PointerMap *pm, size_t offset) 2239 { 2240 // like struct Array { size_t length; byte* data; } 2241 pm->pointer(offset + sizeof(size_t)); 2242 } 2243 2244 /***************************** TypeAArray *****************************/ 2245 (gdb) print *pm $3 = { m_bits = { <Object> = { _vptr.Object = 0x5939d0 }, members of Bits: bitdim = 3, allocdim = 1, data = 0x11e4c70 }, m_size = 20 } (gdb) print offset $4 = 12 I don't know enough about DMD internals to debug this myself, so any help will be very much appreciated. I'd like to run my test suite to the GC with precise scanning to see how it goes. I've noticed that false pointers can add a lot of variance in the time a program can take in Linux, where the addresses returned by mmap() is randomized, so there are times where the address range returned by mmap() is much more prone to receive false pointers. See this for the full story: http://www.llucax.com.ar/blog/blog/post/-7a56a111 Running dil to generate the full Tango documentation can take from 50 to 80 seconds depending on the address range returned by the OS (I suspect because of false pointers; which I hope to prove trying this patch :) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 21, 2010 [Issue 3463] Integrate Precise Heap Scanning Into the GC | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | http://d.puremagic.com/issues/show_bug.cgi?id=3463 --- Comment #28 from Leandro Lucarella <llucax@gmail.com> 2010-07-20 19:51:19 PDT --- Some extra info: (gdb) up #5 0x00000000004679d4 in VarDeclaration::fillPointerMap (this=0x1130700, pm=0x7fff15974fc0, a_offset=0) at declaration.c:1379 1379 type->fillPointerMap(pm, offset + a_offset); (gdb) list 1374 1375 void VarDeclaration::fillPointerMap(PointerMap *pm, size_t a_offset) 1376 { 1377 //printf("VarDeclaration::fillPointerMap() %s, ty = %d, offs=%d\n", toChars(), type->ty, (int)offset); 1378 if (!isDataseg()) 1379 type->fillPointerMap(pm, offset + a_offset); 1380 } 1381 1382 /****************************************** 1383 * If a variable has an auto destructor call, return call for it. I have commented out that printf() and this is what I got: VarDeclaration::fillPointerMap() bytes, ty = 19, offs=8 VarDeclaration::fillPointerMap() buffer, ty = 0, offs=12 dmd: mtype.c:5671: void PointerMap::pointer(size_t): Assertion `offset < m_size' failed. And this is the piece of D code triggering the assertion: package class MerkleDamgard : Digest { private uint bytes; private ubyte[] buffer; <---- This one! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 21, 2010 [Issue 3463] Integrate Precise Heap Scanning Into the GC | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | http://d.puremagic.com/issues/show_bug.cgi?id=3463 --- Comment #29 from Leandro Lucarella <llucax@gmail.com> 2010-07-20 20:01:30 PDT --- Woops! I'm sorry about the noise, I just found out what the problem was. I was trying building DMD as a 64 bits app, so sizeof(size_t) was 8, but the generated code was 32 bits, so it should be 4. Anyway, the lesson learned is that this patch doesn't look right for cross compilation. I don't even know if DMD is supposed to work as a cross-compiler, though. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation