Re: [DOTNET-ROTOR] sorry! forgot to send the build errors
thank you so much On Wed, 26 Jan 2005, Jan Kotas wrote: This is due to version incompatibility. servicing.sscli.net project contained fixes to make Rotor work well on FreeBSD 5.2. Unfortunately, sscli.net was shut down. I have not found a new home for the Rotorv1 servicing project yet. I will send you the patch to try it out - the mailing list does not allow attachments. There may be more fixes necessary for FreeBSD 5.3. I do not have FreeBSD 5.3 installed to verify. We are still running FreeBSD 5.2.1 as Rotor v2 development environment here. -Jan -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Wednesday, January 26, 2005 4:14 AM To: DOTNET-ROTOR@DISCUSS.DEVELOP.COM Subject: [DOTNET-ROTOR] sorry! forgot to send the build errors Hi, building rotor version Beta1.0 (Nov1,2002) on a recently installed FreeBSD 5.3 gave me the following errors. is this occuring due to an incorrect install of BSD or is it due to version incompatibility? please help! pal/unix/builddf.log: make: mkdir -p objdf cd objdf make -f ../makefile COMMON_PREFIX=../../ target gcc -c -DHAVE_CONFIG_H -g -O2 -Wall -fno-exceptions -fno-common -g -O2 -fPIC -DPIC -I../../.. -I../../include -I../../objdf -o misc.o ../misc.c ../misc.c: In function `PAL_realloc': ../misc.c:62: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:72: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c: In function `_rotl': ../misc.c:89: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:92: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c: In function `_rotr': ../misc.c:108: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:111: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c: In function `_gcvt': ../misc.c:125: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:129: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:146: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:150: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c: In function `__iscsym': ../misc.c:166: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:170: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:174: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c: In function `PAL_isprint': ../misc.c:193: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:195: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c: In function `PAL_errno': ../misc.c:212: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:214: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c: In function `_putenv': /misc.c:259: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:263: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:264: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:269: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c: At top level: ../misc.c:284: error: conflicting types for 'PAL_localtime' ../../../rotor_pal.h:3353: error: previous declaration of 'PAL_localtime' was here ../misc.c:284: error: conflicting types for 'PAL_localtime' ../../../rotor_pal.h:3353: error: previous declaration of 'PAL_localtime' was here ../misc.c: In function `PAL_localtime': ../misc.c:289: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:298: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:303: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c:325: warning: passing arg 4 of `DBG_printf_gcc' discards qualifiers from pointer target type ../misc.c: At top level: ../misc.c:340: error: conflicting types for 'PAL_mktime' ../../../rotor_pal.h:3354: error: previous declaration of 'PAL_mktime' was here ../misc.c:340: error: conflicting types for 'PAL_mktime' ../../../rotor_pal.h:3354: error: previous declaration of 'PAL_mktime' was here ../misc.c: In function `PAL_mktime': ../misc.c:344: warning: passing arg 4
Re: [DOTNET-ROTOR] about the write barrier
Hi, i got what you are saying, let me ask in a more specific way. if we look at the rotor code, inside setCardTable.. the card entry for location is dirtied by checking only whether ref is ephemeral or not (young or not) so is my assumption right that the card entry for location will be dirtied even if location is ephemeral? for *location=ref setCardTable.. (location, ref) { if ref = g_ephemeral_low ref g_ephemeral_high { get gcard of location dirty card in card table } } thanks archana === This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
[DOTNET-ROTOR] about the write barrier
Hi, (wrt Rotor v1.0) for a statement *dst=ref, the barrier code checks whether ref is in the young generation or not. however it is not clear whether it checks whether dst belongs to the old generation or not? since the code in gcee.cpp only checks whether dst is a valid heap reference. does that mean the barrier passes the test even if dst belongs to the young generation? Wishing all of you a very Happy new Year! --archana === This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
[DOTNET-ROTOR] recognizing a library call
Hi, is there any way one can recognize (from within the csharp compiler) whether x=y.call(..) is a library call or not. is there any field in METHSYM or METHINFO that can give this information. i tried isSysNative, isExternal but it didnt work. Thanks archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET November 29 - December 03, 204, in London, UK December 06-10, 2004, in Los Angeles http://www.develop.com/courses/gdotnetls Essential .NET: building applications and components with CSharp November 29 - December 03, 2004, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] adjusting stack back while method return
yes you are right, does this following piece of code take into acc even local variables? it is alteast not evident thanks On Mon, 22 Nov 2004, Govind Kanshi wrote: If I understand your question correctly you are looking for epilog stuff Look up x86fjit.h and x86def.h #define x86_emit_return(argsSize) \ x86_mov_reg(x86DirTo, x86Big, x86_mod_ind_disp(X86_ESI, X86_EBP, 0-sizeof(void*))); \ x86_mov_reg(x86DirTo, x86Big, x86_mod_reg(X86_ESP,X86_EBP));\ x86_pop(X86_EBP); \ x86_ret(argsSize) #define x86_drop -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Monday, November 22, 2004 2:04 PM To: [EMAIL PROTECTED] Subject: adjusting stack back while method return Hi, although the code where the stack is grown according to the number of local variables is very clear and explicit; the reverse is not clear, when the method returns. can some one please point out where in the JIT, the stack is dropped depending on the #locals that were allocated. how the stack is adjusted wrt arguments, return values are simple to find though. Thanks very much. archana === This list is hosted by DevelopMentor(r) http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET November 29 - December 03, 204, in London, UK December 06-10, 2004, in Los Angeles http://www.develop.com/courses/gdotnetls Essential .NET: building applications and components with CSharp November 29 - December 03, 2004, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET November 29 - December 03, 204, in London, UK December 06-10, 2004, in Los Angeles http://www.develop.com/courses/gdotnetls Essential .NET: building applications and components with CSharp November 29 - December 03, 2004, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com -- Regards, Archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET November 29 - December 03, 204, in London, UK December 06-10, 2004, in Los Angeles http://www.develop.com/courses/gdotnetls Essential .NET: building applications and components with CSharp November 29 - December 03, 2004, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com
[DOTNET-ROTOR] allocing space on stack
Hi, could some one please explain the following- 1. what kind of classes go through the value_class condition in fjit.cpp: compile_ceenewobj (..)? (i tried using structs but it doesnt go thru that segment). 2. which piece of code (or macro if any) is responsible for allocing space on the stack? thanks verym uch archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET November 29 - December 03, 204, in London, UK December 06-10, 2004, in Los Angeles http://www.develop.com/courses/gdotnetls Essential .NET: building applications and components with CSharp November 29 - December 03, 2004, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] value arrays
Could we indicate to the JIT that it should treat a particular class as a value class through the usage of user defined attributes? more specifically i was trying to implement allocating certain classes on the stack directly. thanks again for your prompt replies. regards archana On Fri, 12 Nov 2004, Jan Kotas wrote: This is support for arrays of constant size. This feature was not fully implemented and it is disabled. You can assume that isValueArray always returns false. -Jan -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Friday, November 12, 2004 10:28 PM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] value arrays Hi, in many places in the code there is mentioned something called isValueArray(..), ELEMENT_TYPE_VALUEARRAY. what does valuearray mean or what kind of arrays satisfy the valueArray condition? thanks very much archana === This list is hosted by DevelopMentor(r) http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET November 29 - December 03, 204, in London, UK December 06-10, 2004, in Los Angeles http://www.develop.com/courses/gdotnetls Essential .NET: building applications and components with CSharp November 29 - December 03, 2004, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET November 29 - December 03, 204, in London, UK December 06-10, 2004, in Los Angeles http://www.develop.com/courses/gdotnetls Essential .NET: building applications and components with CSharp November 29 - December 03, 2004, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com -- Regards, Archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET November 29 - December 03, 204, in London, UK December 06-10, 2004, in Los Angeles http://www.develop.com/courses/gdotnetls Essential .NET: building applications and components with CSharp November 29 - December 03, 2004, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] adding a new alloc function
Hi, could someone please explain how to make the JIT recognize the new custom attribute as mentioned below? Thanks archana On Tue, 24 Aug 2004, Jan Kotas wrote: - If all instances of certain classes are supposed to be allocated by your allocator, you can use custom attribute to mark them as such. Or you can use custom attribute to say that all instances of given class in an assembly should be allocated using your allocator. The JIT would consult the custom attribute every time it jitted a newobj instruction and call the appropriate internal implementation of new. === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET November 29 - December 03, 204, in London, UK December 06-10, 2004, in Los Angeles http://www.develop.com/courses/gdotnetls Essential .NET: building applications and components with CSharp November 29 - December 03, 2004, in Los Angeles http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] adding a new alloc function
Hi, wrt reply below, Assuming that one takes the Attribute route. Lets say X is such a class. If X has some built-in classes as members like for example an Arraylist as its member say f. Going by the same vein, f can be marked with such an attribute. so that would cover up for f=new ArrayList(); But there might be calls on f like f.Add(object) which internally does allocation but is not visible to the outside world. Can this scheme extend to allocation happening inside too? ie, Can Attributes be used to solve this problem? If not is there any other way? Thanks very much archana On Tue, 24 Aug 2004, Jan Kotas wrote: - If all instances of certain classes are supposed to be allocated by your allocator, you can use custom attribute to mark them as such. Or you can use custom attribute to say that all instances of given class in an assembly should be allocated using your allocator. The JIT would consult the custom attribute every time it jitted a newobj instruction and call the appropriate internal implementation of new. === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET Sept 27-Oct 1, in Torrance http://www.develop.com/courses/gdotnetls Essential.NET Sept 20-24, in San Francisco Essential.NET Oct. 4-8, in London http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] C# equivalent of StreamTokenizer
The same is true for PushbackInputStream of Java? thanks very much archana On Wed, 29 Sep 2004, Keith Hill wrote: Unfortunately no. For very simple tokenizing have a look at System.String.Split(). For more complex tokenizing see System.Text.RegularExpressions.Regex. -- Keith -Original Message- From: Archana [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 28, 2004 4:22 AM Subject: C# equivalent of StreamTokenizer Hi, Is there a class in C# equivalent to that of Streamtokenizer in Java? pls forgive me if this question isnt relevant to the discussion group. Thanks archana === This list is hosted by DevelopMentor(r) http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET Sept 27-Oct 1, in Torrance http://www.develop.com/courses/gdotnetls Essential.NET Sept 20-24, in San Francisco Essential.NET Oct. 4-8, in London http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET Sept 27-Oct 1, in Torrance http://www.develop.com/courses/gdotnetls Essential.NET Sept 20-24, in San Francisco Essential.NET Oct. 4-8, in London http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com -- Regards, Archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET Sept 27-Oct 1, in Torrance http://www.develop.com/courses/gdotnetls Essential.NET Sept 20-24, in San Francisco Essential.NET Oct. 4-8, in London http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com
[DOTNET-ROTOR] C# equivalent of StreamTokenizer
Hi, Is there a class in C# equivalent to that of Streamtokenizer in Java? pls forgive me if this question isnt relevant to the discussion group. Thanks archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla.NET Sept 27-Oct 1, in Torrance http://www.develop.com/courses/gdotnetls Essential.NET Sept 20-24, in San Francisco Essential.NET Oct. 4-8, in London http://www.develop.com/courses/edotnet View archives and manage your subscription(s) at http://discuss.develop.com
[DOTNET-ROTOR] about Csharp benchmarks
Hi, regarding the recently released CLI benchmarks- lcscbench and ahcbench. The webpage http://research.microsoft.com/~zorn/benchmarks/default.htm says that the source code for the LCSC compiler benchmark is currently unavailable. Any idea as to when would it be available? Thanks archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] adding a new alloc function
Hi, Thanks for such a prompt response. the solution sounds kind of complicated. well,actually i just want a function that can allocate memory, like new that i can call in a C# program. Isnt there any other way to do it. say as pointed out by you in the first option- if i want to have a method instead of another instruction, what would the changes involve. it might be a lot simpler than this? Regards archana On Mon, 23 Aug 2004, Jan Kotas wrote: If you want to expose this feature in C# and seemingly integrate into IL, then it involves: - Carefully design the whole thing: Do you really need a new instruction? Won't be attribute or method enough? If it needs to be a new instruction, should it be a standalone instruction or prefix? Etc. - Add support for the new instruction in the CLR: google for adding instruction in Rotor to find tutorial on how to do that. - Modify the C# compiler to accept the new keyword. Look for the dataflow for the existing new operator (NK_NEW, TID_NEW, CEE_NEWOBJ, EXF_NEWOBJCALL and bindNew) and modify the codepaths appropriately depending on what your instruction does exactly. -Jan -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Monday, August 23, 2004 9:49 PM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] adding a new alloc function Hi, incase one needs to add a new alloc function apart from getting memory using the operator new, what are the changes involved in doing so. what all files in Rotor need to change etc.. eg: x=new object(), x = new1 object(); Thanks, archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] adding a new alloc function
Hi, - If all instances of certain classes are supposed to be allocated by your allocator, you can use custom attribute to mark them as such. Or you can use custom attribute to say that all instances of given class in an assembly should be allocated using your allocator. The JIT would consult the custom attribute every time it jitted a newobj instruction and call the appropriate internal implementation of new. This could be the closest to what i want to implement. In the function compileCEE_Newobj(..) there are a lot of clauses wrt targetClassAttributes, so do i need to add an additional clause over there, possibly adding a new attribute as well to call this 'other' allocator? How can i specify class attributes? Thanks, archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] adding a new alloc function
Hi, i just realised that the choice of allocation is required at the alloc-site level rather than at the class level so the only option is the last one- wrapping the new operator? could u please elaborate on that?? Thanks archana On Tue, 24 Aug 2004, Jan Kotas wrote: New/newobj is a primitive operation that is hardwired into many parts of the system. It is not just another function. Simplification of the solution to your problem will likely come from tagging the existing New/newobj to use your allocator instead of implementing the entire parallel New/newobj world. Here are more details about the attribute and method ideas that I have mentioned below: - If all instances of certain classes are supposed to be allocated by your allocator, you can use custom attribute to mark them as such. Or you can use custom attribute to say that all instances of given class in an assembly should be allocated using your allocator. The JIT would consult the custom attribute every time it jitted a newobj instruction and call the appropriate internal implementation of new. - Instead of introducing a new new operator, you can introduce a helper function to wrap existing calls to new operator like: mycustomallocator(new Object()). Then the JIT can look for newobj immediately followed by call to your helper function and convert these sequences to use the custom allocator. There is a problem that mycustomallocator would always return object, and you would need to cast in the pattern as well. You can overcome it if you use generics: static T mycustomallocatorT(T o) -Jan -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Tuesday, August 24, 2004 4:26 AM To: [EMAIL PROTECTED] Subject: Re: [DOTNET-ROTOR] adding a new alloc function Hi, Thanks for such a prompt response. the solution sounds kind of complicated. well,actually i just want a function that can allocate memory, like new that i can call in a C# program. Isnt there any other way to do it. say as pointed out by you in the first option- if i want to have a method instead of another instruction, what would the changes involve. it might be a lot simpler than this? Regards archana On Mon, 23 Aug 2004, Jan Kotas wrote: If you want to expose this feature in C# and seemingly integrate into IL, then it involves: - Carefully design the whole thing: Do you really need a new instruction? Won't be attribute or method enough? If it needs to be a new instruction, should it be a standalone instruction or prefix? Etc. - Add support for the new instruction in the CLR: google for adding instruction in Rotor to find tutorial on how to do that. - Modify the C# compiler to accept the new keyword. Look for the dataflow for the existing new operator (NK_NEW, TID_NEW, CEE_NEWOBJ, EXF_NEWOBJCALL and bindNew) and modify the codepaths appropriately depending on what your instruction does exactly. -Jan -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Monday, August 23, 2004 9:49 PM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] adding a new alloc function Hi, incase one needs to add a new alloc function apart from getting memory using the operator new, what are the changes involved in doing so. what all files in Rotor need to change etc.. eg: x=new object(), x = new1 object(); Thanks, archana === This list is hosted by DevelopMentor(r) http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com -- Regards, Archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
[DOTNET-ROTOR] How does the jit handle an alloc-stmt?
Hi, wrt the following test program, i am trying to find out how exactly the jit manages alloc-stmts, namespace DefaultNamespace { using System; public class Test { int x; public Test() { 1- Random r=new Random(1234); } } public class mainclass { public static int Main() { Console.WriteLine(first stmt); 2- Test t=new Test(); return 0; } referring to allocation point 1, a call to compileCEE_NEWOBJ is made, which ultimately calls JIT_NewArr1 that can be captured by a break. but wrt alloc point 2, no such call is made. but if we disassemble the code, both the allocations have corresponding newobj opcodes- IL_000b: newobj instance void [mscorlib]System.Random::.ctor(int32) and IL_000a: newobj instance void DefaultNamespace.Test::.ctor() respectively. could someone pls explain what happens to the second alloc call, how is it handled? is it handled thru emitCore(..)? if yes, how does the control flow to that function, and can we track it somehow? Thanks regards archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] How does the jit handle an alloc-stmt?
Hi, actually i stepped through the code and put breaks at JIT_New.. calls, printfs in compileCEE_NEWOBJ function. referringto the disassembled code below, i get a call to compileCEE_NEWOBJ just before ldstr stmt(marked by an arrow). and that is followed by a series of calls to SlowAllocateString(..) corresponding to ldstr. this i got by the way you (Jan) had explained the other day by call SOS(IP2MD..). after this the next stop happens at the Alloc call of size 236 which i found to be the Random object constructor. so when and how is the Test constructor executed? it surely is not calling GCHeap::Alloc(), so the only left option is emitCore, and that what i am not able to figure out how? pls help. .method public hidebysig static int32 Main() cil managed { .entrypoint // Code size 22 (0x16) .maxstack 1 .locals init (class DefaultNamespace.Test V_0, int32 V_1) IL_: ldstr first stmt IL_0005: call void [mscorlib]System.Console::WriteLine(string) IL_000a: newobj instance void DefaultNamespace.Test::.ctor() IL_000f: stloc.0 IL_0010: ldc.i4.0 IL_0011: stloc.1 IL_0012: br.s IL_0014 IL_0014: ldloc.1 IL_0015: ret } // end of method mainclass::Main On Sat, 10 Jul 2004, Jan Kotas wrote: compileCEE_NEWOBJ is hit for both allocations points for me. Are you setting your breakpoints before Main is jitted? -Jan -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Saturday, July 10, 2004 5:31 AM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] How does the jit handle an alloc-stmt? Hi, wrt the following test program, i am trying to find out how exactly the jit manages alloc-stmts, namespace DefaultNamespace { using System; public class Test { int x; public Test() { 1- Random r=new Random(1234); } } public class mainclass { public static int Main() { Console.WriteLine(first stmt); 2- Test t=new Test(); return 0; } referring to allocation point 1, a call to compileCEE_NEWOBJ is made, which ultimately calls JIT_NewArr1 that can be captured by a break. but wrt alloc point 2, no such call is made. but if we disassemble the code, both the allocations have corresponding newobj opcodes- IL_000b: newobj instance void [mscorlib]System.Random::.ctor(int32) and IL_000a: newobj instance void DefaultNamespace.Test::.ctor() respectively. could someone pls explain what happens to the second alloc call, how is it handled? is it handled thru emitCore(..)? if yes, how does the control flow to that function, and can we track it somehow? Thanks regards archana === This list is hosted by DevelopMentor(r) http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com -- Regards, Archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
[DOTNET-ROTOR] tracking the source of an alloc
Hi, How can one find out where the call to GcHEap::Alloc is originating from? i had sent a similar mail regarding how to debug in such cases long time back (ref:help needed wrt debugging, Jul24,2003, that Barry Bond helped me with). i tried the method that was suggested. but i am not able to locate the prolog here. and i dont know if i can use SOS in the Free BSD platform? i am running the application through gdb (Free BSD) and doing a backtrace, this is what i get... Looking at the machine code at #5 in the following output [ #5 0x290be09d in ?? ()], which is Dump of assembler code from 0x290be09d to 0x290be19d: 0x290be09d: add$0x8,%esp 0x290be0a0: add$0x4,%esp 0x290be0a3: push %eax 0x290be0a4: mov$0x290b5bc4,%eax 0x290be0a9: push %eax 0x290be0aa: mov$0x28541678,%eax 0x290be0af: call *%eax 0x290be0b1: add$0x4,%esp 0x290be0b4: mov$0x290b564c,%eax 0x290be0b9: push %eax 0x290be0ba: mov$0x28539b50,%eax 0x290be0bf: call *%eax 0x290be0c1: add$0x4,%esp 0x290be0c4: push %eax 0x290be0c5: mov$0x2d0d0568,%eax 0x290be0ca: call *%eax 0x290be0cc: add$0x8,%esp 0x290be0cf: push %esp 0x290be0d0: push %ebp 0x290be0d1: mov$0xc,%eax 0x290be0d6: push %eax 0x290be0d7: mov$0x2d0d02b4,%eax 0x290be0dc: call *%eax 0x290be0de: add$0xc,%esp 0x290be0e1: mov0xfffc(%ebp),%esi 0x290be0e4: mov%ebp,%esp 0x290be0e6: pop%ebp 0x290be0e7: ret 0x290be0e8: add%al,(%eax) 0x290be0ea: add%al,(%eax) 0x290be0ec: add%al,(%eax) ... Program received signal SIGTRAP, Trace/breakpoint trap. 0x280cff40 in DBG_DebugBreak () at ../context.c:390 (gdb) bt #0 0x280cff40 in DBG_DebugBreak () at ../context.c:390 #1 0x28081cb2 in DebugBreak () at ../debug.c:220 #2 0x28737a66 in Alloc (size=16, bFinalize=0, bContainsPointers=0) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../gcscan.cpp:82 #3 0x28513e63 in FastAllocateObject (pMT=0x2909fb94) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../gcscan.cpp:975 #4 0x2853fd70 in JIT_Box (type=0x2909fb94, unboxedData=0xbfbfb254) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../jitinterface.cpp:6737 #5 0x290be09d in ?? () #6 0x2834bc05 in donestack () from /usr/home/archana/fastgc/sscli/build/v1.x86fstchk.rotor/libsscoree.so #7 0x283e18eb in CallDescrWorker (pSrcEnd=0xbfbfb844, numStackSlots=0, pArgumentRegisters=0xbfbfb814, pTarget=0x290b5a93) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../class.cpp:9769 #8 0x2854ea3e in MethodDesc::CallDescr (this=0x290b5a98, pTarget=0x290b5a93 él\205, pModule=0x81b2c00, pMetaSigOrig=0x290b6b44, fIsStatic=1, pArguments=0x0) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../method.cpp:740 #9 0x2854e274 in MethodDesc::Call (this=0x290b5a98, pArguments=0x0, sig=0x290b6b44) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../method.cpp:567 #10 0x283e2a96 in EEClass::RunClassInit (this=0x29047d6c, pEntry=0x81f9200, pThrowable=0xbfbfc784) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../class.cpp:10010 #11 0x283e322a in EEClass::DoRunClassInitHelper (this=0x29047d6c, pThrowable=0xbfbfc784, pLocalBlock=0x806cc3c, pEntry=0x81f9200, fRunClassInit=1) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../class.cpp:10064 ... thanks Regards archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] tracking the source of an alloc
Hi, i checked the environment vars, they are all set right, but gdb complains about DumpStack? do i have anything extra to make it work? (gdb) call SOS(DumpStack) SOS: Command 'DumpStack' not found. thanks archana On Wed, 7 Jul 2004, Barry Bond wrote: SOS does work on FreeBSD - you invoke it differently than you do on Windows though. From the GDB prompt, switch to thread #5 and type: call SOS(DumpStack) that is equivalent to doing this in NTSD: !sos.DumpStack To find the start of the jitted function, disassemble backwards until you find a push %ebp opcode followed by mov %esp, %ebp. Subtract 4 from the address of the push %ebp opcode and you'll find a 4-byte pointer stored there, which points to a pair of pointers to strings. I don't have a FreeBSD box handy, but I think disas 0x290be09d-0x40 0x290be09d will disassemble 0x40 bytes worth of code just before the machine code in #5. If you don't see the push %ebp / mov %esp, %ebp there, then keep going backwards until you do find it. Barry -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Wednesday, July 07, 2004 9:03 AM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] tracking the source of an alloc Hi, How can one find out where the call to GcHEap::Alloc is originating from? i had sent a similar mail regarding how to debug in such cases long time back (ref:help needed wrt debugging, Jul24,2003, that Barry Bond helped me with). i tried the method that was suggested. but i am not able to locate the prolog here. and i dont know if i can use SOS in the Free BSD platform? i am running the application through gdb (Free BSD) and doing a backtrace, this is what i get... Looking at the machine code at #5 in the following output [ #5 0x290be09d in ?? ()], which is Dump of assembler code from 0x290be09d to 0x290be19d: 0x290be09d: add$0x8,%esp 0x290be0a0: add$0x4,%esp 0x290be0a3: push %eax 0x290be0a4: mov$0x290b5bc4,%eax 0x290be0a9: push %eax 0x290be0aa: mov$0x28541678,%eax 0x290be0af: call *%eax 0x290be0b1: add$0x4,%esp 0x290be0b4: mov$0x290b564c,%eax 0x290be0b9: push %eax 0x290be0ba: mov$0x28539b50,%eax 0x290be0bf: call *%eax 0x290be0c1: add$0x4,%esp 0x290be0c4: push %eax 0x290be0c5: mov$0x2d0d0568,%eax 0x290be0ca: call *%eax 0x290be0cc: add$0x8,%esp 0x290be0cf: push %esp 0x290be0d0: push %ebp 0x290be0d1: mov$0xc,%eax 0x290be0d6: push %eax 0x290be0d7: mov$0x2d0d02b4,%eax 0x290be0dc: call *%eax 0x290be0de: add$0xc,%esp 0x290be0e1: mov0xfffc(%ebp),%esi 0x290be0e4: mov%ebp,%esp 0x290be0e6: pop%ebp 0x290be0e7: ret 0x290be0e8: add%al,(%eax) 0x290be0ea: add%al,(%eax) 0x290be0ec: add%al,(%eax) ... Program received signal SIGTRAP, Trace/breakpoint trap. 0x280cff40 in DBG_DebugBreak () at ../context.c:390 (gdb) bt #0 0x280cff40 in DBG_DebugBreak () at ../context.c:390 #1 0x28081cb2 in DebugBreak () at ../debug.c:220 #2 0x28737a66 in Alloc (size=16, bFinalize=0, bContainsPointers=0) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../gcscan.cpp:82 #3 0x28513e63 in FastAllocateObject (pMT=0x2909fb94) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../gcscan.cpp:975 #4 0x2853fd70 in JIT_Box (type=0x2909fb94, unboxedData=0xbfbfb254) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../jitinterface.cpp:6737 #5 0x290be09d in ?? () #6 0x2834bc05 in donestack () from /usr/home/archana/fastgc/sscli/build/v1.x86fstchk.rotor/libsscoree.so #7 0x283e18eb in CallDescrWorker (pSrcEnd=0xbfbfb844, numStackSlots=0, pArgumentRegisters=0xbfbfb814, pTarget=0x290b5a93) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../class.cpp:9769 #8 0x2854ea3e in MethodDesc::CallDescr (this=0x290b5a98, pTarget=0x290b5a93 él\205, pModule=0x81b2c00, pMetaSigOrig=0x290b6b44, fIsStatic=1, pArguments=0x0) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../method.cpp:740 #9 0x2854e274 in MethodDesc::Call (this=0x290b5a98, pArguments=0x0, sig=0x290b6b44) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../method.cpp:567 #10 0x283e2a96 in EEClass::RunClassInit (this=0x29047d6c, pEntry=0x81f9200, pThrowable=0xbfbfc784) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../class.cpp:10010 #11 0x283e322a in EEClass::DoRunClassInitHelper (this=0x29047d6c, pThrowable=0xbfbfc784, pLocalBlock=0x806cc3c, pEntry=0x81f9200, fRunClassInit=1) at /usr/home/archana/fastgc/sscli/clr/src/vm/wks/../class.cpp:10064 ... thanks Regards archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004
Re: [DOTNET-ROTOR] tracking the source of an alloc
Thank you so much! On Wed, 7 Jul 2004, Jan Kotas wrote: Unfortunately, we did not have enough time to implement DumpStack on FreeBSD. The workaround is to use a regular backtrace, and then use IP2MD SOS command to get the names for managed methods. Below is transcript of debugging session that demonstrates it. -Jan (gdb) break main Breakpoint 1 at 0x8048ca9: file ../../../src/inc/palstartup.h, line 38. (gdb) r Starting program: /home/jkotas/sscli/build/v1.x86fstchk.rotor/clix hello.exe Breakpoint 1, main (argc=2, argv=0xbfbff350) at ../../../src/inc/palstartup.h:38 38 int __cdecl main(int argc, char **argv) { (gdb) break WriteFile Breakpoint 2 at 0x2808ad81: file ../file.c, line 1548. (gdb) c Continuing. Breakpoint 2, WriteFile (hFile=0x10, lpBuffer=0xbfbfc957, nNumberOfBytesToWrite=0, lpNumberOfBytesWritten=0xbfbfc958, lpOverlapped=0x0) at ../file.c:1548 1548{ Current language: auto; currently c (gdb) bt 10 #0 WriteFile (hFile=0x10, lpBuffer=0xbfbfc957, nNumberOfBytesToWrite=0, lpNumberOfBytesWritten=0xbfbfc958, lpOverlapped=0x0) at ../file.c:1548 #1 0x284c49a3 in COMStreams::ConsoleHandleIsValid (handle=0x10) at /home/jkotas/sscli/clr/src/vm/wks/../comstreams.cpp:161 #2 0x2b0b9398 in ?? () #3 0x2b0b9254 in ?? () #4 0x2b0b8dc0 in ?? () #5 0x28386855 in donestack () at ../../../inc/../md/inc/liteweightstgdb.h:82 #6 0x2841ccff in CallDescrWorker (pSrcEnd=0xbfbfcfb0, numStackSlots=0, pArgumentRegisters=0xbfbfcf80, pTarget=0x2f29e473) at /home/jkotas/sscli/clr/src/vm/wks/../class.cpp:9769 #7 0x2858a0aa in MethodDesc::CallDescr (this=0x2f29e478, pTarget=0x2f29e473 é\234~áÿj\037ý*VÊü*, pModule=0x8110400, pMetaSigOrig=0x2b0ae704, fIsStatic=1, pArguments=0x0) at /home/jkotas/sscli/clr/src/vm/wks/../method.cpp:738 #8 0x28589910 in MethodDesc::Call (this=0x2f29e478, pArguments=0x0, sig=0x2b0ae704) at /home/jkotas/sscli/clr/src/vm/wks/../method.cpp:567 #9 0x2841de96 in EEClass::RunClassInit (this=0x2b041d0c, pEntry=0x811f280, pThrowable=0xbfbfdf60) at /home/jkotas/sscli/clr/src/vm/wks/../class.cpp:10010 (More stack frames follow...) (gdb) call SOS(IP2MD 0x2b0b9254) MethodDesc: 0x2f29e608 Jitted by EJIT Method Name : [DEFAULT] Class System.IO.Stream System.Console.OpenStandardOutput(I4) Class : 2b041d0c MethodTable 2f29ed78 mdToken: 060004ef Flags : 10 Method VA : 2f0b6324 (gdb) -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Wednesday, July 07, 2004 9:07 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET-ROTOR] tracking the source of an alloc Hi, i checked the environment vars, they are all set right, but gdb complains about DumpStack? do i have anything extra to make it work? (gdb) call SOS(DumpStack) SOS: Command 'DumpStack' not found. thanks archana On Wed, 7 Jul 2004, Barry Bond wrote: SOS does work on FreeBSD - you invoke it differently than you do on Windows though. From the GDB prompt, switch to thread #5 and type: call SOS(DumpStack) that is equivalent to doing this in NTSD: !sos.DumpStack To find the start of the jitted function, disassemble backwards until you find a push %ebp opcode followed by mov %esp, %ebp. Subtract 4 from the address of the push %ebp opcode and you'll find a 4-byte pointer stored there, which points to a pair of pointers to strings. I don't have a FreeBSD box handy, but I think disas 0x290be09d-0x40 0x290be09d will disassemble 0x40 bytes worth of code just before the machine code in #5. If you don't see the push %ebp / mov %esp, %ebp there, then keep going backwards until you do find it. Barry -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Wednesday, July 07, 2004 9:03 AM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] tracking the source of an alloc Hi, How can one find out where the call to GcHEap::Alloc is originating from? i had sent a similar mail regarding how to debug in such cases long time back (ref:help needed wrt debugging, Jul24,2003, that Barry Bond helped me with). i tried the method that was suggested. but i am not able to locate the prolog here. and i dont know if i can use SOS in the Free BSD platform? i am running the application through gdb (Free BSD) and doing a backtrace, this is what i get... Looking at the machine code at #5 in the following output [ #5 0x290be09d in ?? ()], which is Dump of assembler code from 0x290be09d to 0x290be19d: 0x290be09d: add$0x8,%esp 0x290be0a0: add$0x4,%esp 0x290be0a3: push %eax 0x290be0a4: mov$0x290b5bc4,%eax 0x290be0a9: push %eax 0x290be0aa: mov$0x28541678,%eax 0x290be0af: call *%eax 0x290be0b1: add$0x4,%esp
Re: [DOTNET-ROTOR] GetThread() function
yes, Free BSD On Tue, 22 Jun 2004, Barry Bond wrote: What platform are you running on? FreeBSD? Barry -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Tuesday, June 22, 2004 7:58 AM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] GetThread() function Hi, some of my modifications (i dont know which) is making GetThread() return NULL. where is this function defined? if possible could you give some hints as to what could possibly be the problem thanks archana === This list is hosted by DevelopMentor(r) http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com -- Regards, Archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] GetThread() function
Hi, i tried calling SetupThread() after CreateThread(), but the problem still persists On Tue, 22 Jun 2004, Jan Kotas wrote: GetThread() returns non-NULL only if SetupThread() was called on the thread. If you need GetThread() to return non-NULL, you need to call SetupThread() at least once on the thread. GetThread is not a function. It is a pointer to a function. It is defined in threads.h / threads.cpp. It points to GetAppDomainGeneric once the runtime has been initialized. -Jan -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Tuesday, June 22, 2004 7:58 AM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] GetThread() function Hi, some of my modifications (i dont know which) is making GetThread() return NULL. where is this function defined? if possible could you give some hints as to what could possibly be the problem thanks archana === This list is hosted by DevelopMentor(r) http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com -- Regards, Archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] Accessing the class in different source folder
Hi, On Mon, 21 Jun 2004, Barry Bond wrote: A good example to follow is ildbsymbols.dll, in clr\src\tools\ildbsymbols. 1. ildbsymbols has an ildbsymbols.def file that was manually authored and is included in the tarball. The sources file in clr\src\tools\ildbsymbols references it via DLLDEF=ildbsymbols.def. so a .def has to be manually created for the gc module too? if so how should one go about it? Thanks archana === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] Accessing the class in different source folder
Hi, this is wrt a previous posting in this group which says how to limit code into a separate folder and expose it as a dll. i have been trying to do the same for the GC module. could you please explain the following wrt the steps outlined below? 1. how is the DLLDEF file created? 2. the coffbase.txt already has entries regarding base address,length etc.. for each DLL. in what way should a new entry be made? Thanks Regards archana Original Message Subject:Re: [DOTNET-ROTOR] Accessing the class in different source folder Date: Sun, 6 Jul 2003 09:50:55 -0700 From: Barry Bond [EMAIL PROTECTED] Reply-To: Discussion of the Rotor Shared Source CLI implementation === This list is hosted by DevelopMentor® http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] about Pinning objects
Hi, On Thu, 5 Feb 2004, Jan Kotas wrote: The only way to see in the current implementation whether the given object is pinned is by scanning all GC roots. The GC_CALL_PINNED flag is going to be set in the callback for objects that are pinned. You are referring to the Promote(..) call where the flags parameter contains GC_CALL_PINNED? initially it appeared that if an object is pinned the flags will have the value GC_CALL_PINNED. but when i put printfs in the code the same object that was pinned was being called with different flag values 4,2(GC_CALL_PINNED),10. thats what has confused me. Can you explain this a bit? The handle table is not the only part of the code that can pin objects: the callback from the JIT and from EE Frames can cause GC_CALL_PINNED to be set as well (look for GC_CALL_PINNED in FJIT_eetwain.cpp and frames.cpp). Suppose we have a fixed (..) statement in the code. Will this also map to one of the callbacks eventually? Thanks archana === This list is hosted by DevelopMentor® http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] the write barrier
On Tue, 13 Jan 2004, Vladimir Fedorov wrote: You would have to track the 'this' pointer from which the pointer to the field is generated and use it instead of the field address. For stfld, ldfld instructions it should be quite manageable since they take a 'this' pointer. For stind and stsfld it will be more difficult. Where/which function should i look into for 'this' ptr? compileCEE_STFLD(opcode)? since i am not familiar with /fjit code can you please give me some starting point so that i can try to figure out the rest. Thank you so much archana Vladimir This posting is provided AS IS with no warranties, and confers no rights. -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Monday, January 12, 2004 10:57 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET-ROTOR] the write barrier On Mon, 12 Jan 2004, Vladimir Fedorov wrote: I assume by dirty, you mean flip the bit in the card table corresponding to the memory location in which a potential cross-generational pointer is being stored. Correct. Also when you refer to base I assume you mean the start of the object containing the memory location. Yes. thats exactly what i was referring to In this case you don't need to do anything, GC will scan the whole object to update the potential cross generational pointers even if the objects spans multiple cards some of which are not flipped. The brick table is used to found the start of the first object outside the card that has been flipped. The reason i am trying to fit in my own GC that requires the writebarrier(objbase, value) due to the algorithm functionality. and finding the object base at runtime would be too costly. Is there any way to do this in compile time? Regards, Archana === This list is hosted by DevelopMentor(r) http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com === This list is hosted by DevelopMentor® http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com -- Regards, Archana === This list is hosted by DevelopMentor® http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] build error after making changes
Try this: cd sscli/clr/src/ilasm build This should print a useful error message. If it doesn't, open builddf.log in the current directory: it contains the output from all of the tools used during the build. okay i shall try that right away. thank you From the list of things that failed, my guess is that something failed to build in clr\src\vm and it caused a cascade of failures from all things that depend on it. thats right bcos all the changes are made only to files in vm. but when i ran the command ./build in the vm directory and also in src/dlls/mscoree it gave me only a few warnings. are the warnings the reason? Barry -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Friday, January 09, 2004 9:08 PM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] build error after making changes Hi, After making modifications to code when i gave a fresh fastchecked build (using ./buildall) i am getting the following errors. Is there anyway to trace to the source of the error. Please help. Thanks Regards archana BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/ilasm, /home/archana/fastgc/sscli/build/v1.x86fstchk.rotor\sdk\bin\ilasm) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/ilasm - exiting. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/ildasm ,/home/archana/fastgc/sscli/build/v1.x86fstchk.rotor\sdk\bin\ildasm) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/ildasm - exiting. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/metain fo,/home/archana/fastgc/sscli/build/v1.x86fstchk.rotor\sdk\bin\metainfo) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/metainfo - exiting. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/peveri fy,/home/archana/fastgc/sscli/build/v1.x86fstchk.rotor\sdk\bin\peverify) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/peverify - exiting. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/sn,/ho me/archana/fastgc/sscli/ build/v1.x86fstchk.rotor\sdk\bin\sn) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/sn - exiting. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/permvi ew,/home/archana/fastgc/ sscli/build/v1.x86fstchk.rotor\sdk\bin\permview) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/permview - exi ting. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/gacuti l,/home/archana/fastgc/s scli/build/v1.x86fstchk.rotor\.\gacutil) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/gacutil - exit ing. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/al,/ho me/archana/fastgc/sscli/ build/v1.x86fstchk.rotor\.\al) failed 2 === This list is hosted by DevelopMentor(r) http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com === This list is hosted by DevelopMentor® http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com -- Regards, Archana === This list is hosted by DevelopMentor® http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com
[DOTNET-ROTOR] build error after making changes
Hi, After making modifications to code when i gave a fresh fastchecked build (using ./buildall) i am getting the following errors. Is there anyway to trace to the source of the error. Please help. Thanks Regards archana BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/ilasm,/home/archana/fastgc/sscli/build/v1.x86fstchk.rotor\sdk\bin\ilasm) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/ilasm - exiting. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/ildasm,/home/archana/fastgc/sscli/build/v1.x86fstchk.rotor\sdk\bin\ildasm) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/ildasm - exiting. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/metainfo,/home/archana/fastgc/sscli/build/v1.x86fstchk.rotor\sdk\bin\metainfo) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/metainfo - exiting. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/peverify,/home/archana/fastgc/sscli/build/v1.x86fstchk.rotor\sdk\bin\peverify) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/peverify - exiting. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/sn,/home/archana/fastgc/sscli/ build/v1.x86fstchk.rotor\sdk\bin\sn) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/sn - exiting. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/permview,/home/archana/fastgc/ sscli/build/v1.x86fstchk.rotor\sdk\bin\permview) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/permview - exi ting. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/gacutil,/home/archana/fastgc/s scli/build/v1.x86fstchk.rotor\.\gacutil) failed 2 BINPLACE : fatal error BNP: Unable to place file /home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/gacutil - exit ing. BINPLACE : warning BNP: CopyFile(/home/archana/fastgc/sscli/clr/bin/rotor_x86/fastchecked/al,/home/archana/fastgc/sscli/ build/v1.x86fstchk.rotor\.\al) failed 2 === This list is hosted by DevelopMentor® http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] qstn about the write barrier - got this one, Thank you
JIT_Stelem_Ref calls setobjectreferenceunchecked(..) which we can be used to dirty the base instead. On Thu, 25 Dec 2003, Archana wrote: Hi, The following code segment is from the file sscli/tests/../keepaliveother/keepaliveoutofmemory.cs for(i=0;i1000;i++) { .. arr[i]=new Dummy(); // -- } Will this line pass through the write barrier code. ie. Does Rotor dirty the card corresponding to address arr?. if one needs to add such a barrier, should the following code be considered? #define emit_LDELEM_REF() {...} if not, please guide me to the right location where i should the barrier code. Thanks archana === This list is hosted by DevelopMentor® http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com === This list is hosted by DevelopMentor® http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com
[DOTNET-ROTOR] Help needed wrt thread synchronization
Hi, As part of writing a concurrent GC the call to CommonTripThread() was added to the GC code in addition to lot of other changes. Everything seemed to work ok before i added this call but now i am getting the following unrecoverable error. Is this occurring because of the added call? generally, when can such an error occur? the problem is i dont know where the call to ThreadEntry is happening from. Please help. Merry Christmas and a Very Happy New Year to all of you. Regards archana Microsoft (R) Shared Source CLI Test Debugger Shell Version 1.0.0003.0 Copyright (C) Microsoft Corporation 1998-2002. All rights reserved. (cordbg) a 0xdea3 Program received signal SIGTRAP, Trace/breakpoint trap. DBG_DebugBreak () at ../context.c:391 391 } Current language: auto; currently c (gdb) bt #0 DBG_DebugBreak () at ../context.c:391 #1 0x2808c690 in DebugBreak () at ../debug.c:220 #2 0x2875c608 in Debugger::UnrecoverableError (this=0x8079100, errorHR=-2147024890, errorCode=0, errorFile=0x28b85500 /usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../rcthread.cpp, errorLine=1082, exitThread=false) at /usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../debugger.cpp:9209 #3 0x287677f9 in DebuggerRCThread::SendIPCEvent (this=0x28db4008, iTarget=IPC_TARGET_OUTOFPROC) at /usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../rcthread.cpp:1083 #4 0x287543bc in Debugger::SendCreateAppDomainEvent (this=0x8079100, pRuntimeAppDomain=0x806d800, fAttaching=1) at /usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../debugger.cpp:5596 #5 0x2875e108 in Debugger::IterateAppDomainsForAttach (this=0x8079100, EventsToSend=ONLY_SEND_APP_DOMAIN_CREATE_EVENTS, fEventSent=0x80bd504, fAttaching=1) at /usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../debugger.cpp:9885 #6 0x2874fb99 in Debugger::SendSyncCompleteIPCEvent (this=0x8079100) at /usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../debugger.cpp:3730 #7 0x2874ff29 in Debugger::TrapAllRuntimeThreads (this=0x8079100, pAppDomain=0x0, fHoldingThreadStoreLock=0) at /usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../debugger.cpp:3819 #8 0x28758d70 in Debugger::HandleIPCEvent (this=0x8079100, event=0x80bd614, iWhich=IPC_TARGET_OUTOFPROC) at /usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../debugger.cpp:7594 #9 0x28766cd0 in DebuggerRCThread::MainLoop (this=0x28db4008, temporaryHelp=false) at /usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../rcthread.cpp:734 #10 0x287666bd in DebuggerRCThread::ThreadProc (this=0x28db4008) at /usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../rcthread.cpp:590 #11 0x28767222 in DebuggerRCThread::ThreadProcStatic (parameter=0x28db4008) at /usr/home/archana/checked/sscli/clr/src/debug/ee/wks/../rcthread.cpp:861 #12 0x281030f6 in THREADEntry (lpParam=0x807ac00) at ../thread.c:1677 #13 0x2818ff93 in _thread_start () from /usr/lib/libc_r.so.4 #14 0x0 in ?? () === This list is hosted by DevelopMentor® http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] passing additional parameters to clix
i am sorry i framed the question in a wrong way what i meant to ask was 1. Are there any restrictions wrt what kind of parameters to be passed 2. if there are no such constraints then what functions should be called/which part of the code gets modified to access these passed parameters Thanks, archana On Mon, 1 Sep 2003, Gaurav Khanna wrote: Hi! CLIX HelloWorld.exe command line arguments for HelloWorld.exe come here Regards, Gaurav Khanna -- * -- Microsoft MVP - .NET, MCSE Windows 2000/NT4, MCP+I WinToolZone - Spelunking Microsoft Technologies http://www.wintoolzone.com/ OpSupport - Spelunking Rotor http://opsupport.sscli.net/ Read my blog @ http://wic.rediffblogs.com/ -- -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Monday, September 01, 2003 6:36 AM To: [EMAIL PROTECTED] Hi, if we need to pass parameters at runtime ie. while running clix managed.exe what is the right way to do it. Thanks, archana === This list is hosted by DevelopMentor. http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com === This list is hosted by DevelopMentor® http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com === This list is hosted by DevelopMentor® http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com
Re: [DOTNET-ROTOR] Disabling Warnings
After making this change i still get the same message although there are few of them now Most of them are ones that might require explicit casting like the following.. d:\rotor_nov1\sscli\clr\src\vm\wks\..\gcsmp.cpp(6906) : error C2220: warning tre ated as error - no object file generated d:\rotor_nov1\sscli\clr\src\vm\wks\..\gcsmp.cpp(6906) : warning C4018: '=' : signed/unsigned mismatch and when i add /w to the compiler option it says overriding /w with /w4 does 4 mean the warning level over here? Thanks archana On Sat, 2 Aug 2003, Jan Kotas wrote: Try removing -WX and -Wall from COMPILER_WARNINGS in rotorenv\bin\sources.cor. -Jan This posting is provided AS IS with no warranties, and confers no rights. -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Saturday, August 02, 2003 6:19 AM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] Disabling Warnings Hi, Wrt building Rotor on windows, How does one go about disabling Warnings during the build process. And i also get the Warning treated as error which i presume is got do with the warning level, Can someone please tell me how can i set the level to a value such that it treats a warning as a warning Thanks Regards, archana
[DOTNET-ROTOR] Disabling Warnings
Hi, Wrt building Rotor on windows, How does one go about disabling Warnings during the build process. And i also get the Warning treated as error which i presume is got do with the warning level, Can someone please tell me how can i set the level to a value such that it treats a warning as a warning Thanks Regards, archana
[DOTNET-ROTOR] Build times
Hi, In the course of debugging one might need to make changes to core header files like class.h, syncblk.h, object.h etc..And to see to it that these changes get reflected over the code one has to rebuild the whole of vm In my case running the build command {that takes care of dependencies} takes almost 40 minutes to complete. Is there some way to reduce this build time? For example almost a month back there was a discussion in this group about building a separate DLL (in a separate /vm/xxx) etc..but i dont know if it can be applied to core header files Thanks Regards
[DOTNET-ROTOR] Preallocation of objects by rotor
Hi, The log_alloc trace output indicates that before the user program allocates any objects in the heap, rotor itself does a lot of preallocations both in the small the large objects heap. what is the liveness of these pre-created objects, does it stay all along till the end of the application?. Will these objects create pressure on the young generation of the heap [ie. can these objects cause an early young generation collection? because they are so many in number] How does rotor handle this? regards archana
Re: [DOTNET-ROTOR] usage of PAL_TRY
thank you so much, it was indeed a mid-way return that was causing this pblm. regards, archana On Wed, 16 Jul 2003, Barry Bond wrote: This assert means that there is a mismatch somewhere between PAL_TRY and PAL_ENDTRY macros: if something within the PAL_TRY in your sample code can do a 'return' or some other control flow change without executing the code at PAL_ENDTRY, you'll see the assert. The best way to debug it is to put a breakpoint on your new PAL_TRY, and when it hits, set breakpoints on PAL_EndTryHelper and PAL_TryHelper, then see where the mismatch happens. Within the helpers, the seh_info-bottom_frame points to a linked-list of active try blocks on the stack and the assert indicates that the PAL_ENTRY is trying to leave, but isn't the bottom-most node in the list. Barry This posting is provided AS IS with no warranties, and confers no rights. -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Wednesday, July 16, 2003 5:16 AM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] usage of PAL_TRY Hi, in the process of making changes to the garbage collector, i added a few PAL_TRY blocks in gcsmp.cpp. of the following form PAL_TRY { .. if(error) PAL_LEAVE_EX(labelxx); } PAL_EXCEPT_FILTER_EX(labelxx, HandleGCException, NULL) { .. } PAL_ENDTRY but when i debug a simple application, i get the following Assert at the first PAL_ENDTRY that i added.. {0804D000} ASSERT [EXCEPT ] at ../exception.c.442: Exception registration pointers don't match! and if i comment all these it throws up the same assert at another point, in appdomain.cpp (SystemDomain::CreatePreallocatedExceptions) at the COMPLUS_CATCH statement. can you please help. Thanks and regards, archana
Re: [DOTNET-ROTOR] Using posix calls in rotor code
Be very careful adding new locks into the PAL - if you do, you'll need to update the critsec_count in order to avoid PAL-internal deadlocks. if i add additional critical sections/mutexes in the /vm code, do i need to update this critsec_count? Barry This posting is provided AS IS with no warranties, and confers no rights. Regards, archana
[DOTNET-ROTOR] Allocation in vm/i386/jitinterfacex86.cpp
Hi, the functionality of the EmitCore routine in the file jitinterfacex86.cpp is clear, but i am not able to decipher the following.. After one checks whether alloc request can be satisfied EDX contains the updated heap address (old address + allocation size). How does the control flow, pass on this updated address to the caller. the series of emit calls puts the code generated into a memory buffer as i understand. After that what follows isnt clear. Also am i right in assuming that the allocator in EmitCore doesnt consider registering finalizable objects etc.. since its just a bare-bones allocator can someone pls help thanks regards archana
Re: [DOTNET-ROTOR] object handle table interface
Hi, David Stutz wrote: Rotor copies generation 0, and does mark and sweep on generation 1. Are you proposing to build a semi-space collector, which bounces objects back and forth between two spaces? Large objects can be very expensive to scan for interior pointers and to copy, which means that mark and sweep is a good strategy once they get to a certain size. This is also part of what Rotor does now. yeah certainly mark and sweep does a better job esp in case of large objects and stuff, but i was looking at a concurrent GC scheme and implementing copying was easier than sweeping the heap With regard to your question, it should certainly be possible to use the handle table with various kinds of collection algorithm, since support is already there for both copy and mark and sweep. You'll notice that handle collection uses a callback function, GCHeap::Promote, that has the check for generation 0 hardwired into it, which results in calls to either copy_object_simple or mark_object_simple. At the very least, this callback would need to be modified to make the handle table stuff work with other collection strategies. To make everything else work (more than the handle table) would involve more changes, I have no doubt... thank you so much, this was all i wanted to know regards, archana
[DOTNET-ROTOR] object handle table interface
Hi, Can the Object handle table interface be used as it is, with a GC that does copying collection for both minor and major collections (unlike rotor that chooses to do a mark-sweep for a major one). Are there any changes that the developer needs to make for this to work? thanks and regards, archana
[DOTNET-ROTOR] question about the write barrier
Hi, All the write barrier functions take the destination as an object reference (OBJECTREF*). What happens when there is a write to an interior pointer (that may be one of the fields of an object and which is of a primitive type say int *). thanks and regards, archana
Re: [DOTNET-ROTOR] implementation of pinning objects
Hi, Barry Bond wrote: Pinned objects fall into two categories. First, all arguments passed via P/Invoke (also called NDirect) are implicitly pinned. Second, objects can be explicitly allocated as pinned via the managed System.Runtime.InteropServices.GCHandle.Alloc(Object, GCHandleType) method, which adds entries to the objecthandle table. what is an NDirect call? where can i find more info about this Are weak pointers also dealt in the same way ie, are they also formed similarly (via two categories etc..)? In both cases, pinning doesn't incur runtime overhead until the GC runs, and the GC isn't involved with pinning until GCHeap::Promote() is called, with GC_CALL_PINNED set in its 'flags' parameter. In the case of P/Invoke, this is the sequence of events as the stack is being crawled during a GC and an NDirectMethodFrame is encountered: gcscan.cpp's GcStackCrawlCallback() calls a pFrame-GcScanRoots. For P/Invoke, pFrame is an NDirectMethodFrame. frames.h's NDirectMethodFrame::GcScanRoots() calls frames.h's FrameMethodFrame::PromoteCallerStackWithPinning() calls frames.cpp's FramedMethodFrame::PromoteCallerStackWorker() calls frames.cpp's FrameMethodFrame::PromoteCallerStackHelper() takes an fPinArgs parameter which is TRUE in this code path. For each object pointer in a jitted method's stack frame, it calls GCHeap::Promote(..., GC_CALL_PINNED) the Promote either copies/marks the object depending on the generation, where does the call for GCHeap::Relocate actually occur for the NDirectMethodFrame? Thank you, archana
[DOTNET-ROTOR] implementation of pinning objects
Hi, How is Pinning implemented in rotor? Does rotor treat the attribute pinned as a separate type? what is the relation between pinned objects and the objecthandle table? would be of immense help if someone could explain these points. thank you, archana
Re: [DOTNET-ROTOR] object synchronization
hi, Thank you very much for all these inputs, so as i understand it... each object when requires syncn gets a slot in the Sync block table, there are two ptrs- one from the object to the table and the other back to the object from the sync blk table and these pointers (back to the object) are treated as weak pointers and scanned accordingly by the GC sync blk memory is not collected but only the pointer to the obj in the entries are updated (since i am looking at the code with the GC perspective) Are these assumptions about the code correct? 1. the purpose of Gen0List is to reduce scanning time for gen 0 objects something like a cache? the objects of generations 0 have to get scanned from the table entries 2. the entries in the sync blk table are deleted only when - there are no more operations wrt syncing being performed on an object - when the object itself has become garbage Regards. See Jeffrey Richter's article on sync blocks for some more gen. http://msdn.microsoft.com/msdnmag/issues/03/01/NET/default.aspx -Original Message- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED]] On Behalf Of Archana Sent: Monday, January 06, 2003 6:59 AM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] object synchronization Hi, Rotor documentation talks about syncblk routines as ones that provide runtime support wrt object synchronization, Does this mean sync-ing when many threads are trying to access the object at once ? At which level sync-ing is implied are there any other pointers that explain about sync blocks, why they are required etc.. in detail ? Regards
Re: [DOTNET-ROTOR] gc heap structure for rotor
Barry Bond wrote: For example, take a look at GCHeap::IsHeapPointer() in sscli/src/clr/src/vm/gcsmp.cpp. You can see the range-check that the pointer is between g_lowest_address and g_highest_address, and only if it is, IsHeapPointer() calls gcheap::find_segment to determine which (if any) GC heap segment contains the pointer. that means to say, the parameters are for checking at a macro level and IsHeapPointer() is a more detailed check? Is it ok, if an address is validated to be a legal GC heap addr (but since there might be gaps inbetween it is actually does not belong to any of the spaces) this situation might occur since threads.h defines a function IsObjRefValid that doesnt call IsHeapPointer() and uses only the lowest and highest addresses to decide. thank you, archana
[DOTNET-ROTOR] gc heap structure for rotor
Hi, the GC interface in rotor includes two parameters- g_lowest_address and g_highest_address, that define the limits of the heap. am i right in assuming that, if one has to plug in his GC into rotor he has to have a one-dimensional chunk of memory for the heap ie. to say it cant be organized into blocks or any such sort of thing ? Thanks Regards, archana
[DOTNET-ROTOR] suspension of threads in rotor
Hi, Can someone please explain about the modes of suspension in rotor. i believe there are two of them- synchronous and asynchronous 1. in what situations are these two schemes used in the CLR? 2. Does the GC in rotor use both of them to stop the world when it calls suspendEE? thanks and regards, archana