Update of /cvsroot/monetdb/MonetDB5/src/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv11183/src/mal

Modified Files:
        mal_debugger.mx mal_interpreter.mx mal_linker.mx 
        mal_profiler.mx 
Log Message:
propagated changes of Friday Feb 08 2008 - Sunday Feb 10 2008
from the MonetDB_5-4 branch to the development trunk


Index: mal_profiler.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_profiler.mx,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- mal_profiler.mx     7 Feb 2008 08:12:44 -0000       1.103
+++ mal_profiler.mx     10 Feb 2008 23:48:45 -0000      1.104
@@ -47,7 +47,7 @@
 
 @node Event Filtering, Event Caching, The MAL Profiler, The MAL Profiler
 @+ Event Filtering 
-The profiler supports selective retrieval of such information by
+The profiler supports selective retrieval of performance information by
 tagging the instructions of interest. This means that a profiler
 call has a global effect,
 all concurrent users are affected by the performance overhead.
@@ -83,7 +83,7 @@
 profiler.closeStream();
 @end example
 
-We are interested in all functions name @sc{insert} and @sc{print}. 
+In this example, we are interested in all functions name @sc{insert} and 
@sc{print}. 
 A wildcard can be used to signify any name, e.g.
 no constraints are put on the module in which the operations
 are defined.

Index: mal_linker.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_linker.mx,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- mal_linker.mx       11 Jan 2008 10:41:32 -0000      1.101
+++ mal_linker.mx       10 Feb 2008 23:48:45 -0000      1.102
@@ -25,25 +25,19 @@
 The corresponding signature are defined 
 in @dots{}/lib(64)/<modulename>.mal.
 @-
-The default bootstrap script is called @dots{}/lib(64)/MonetDB/mal_init.mal
+The default bootstrap script is called @dots{}/lib/MonetDB5/mal_init.mal
 and it is designated in the configuration file as the mal_init property.
 The rationale for this set-up is that database administrators can
-extend/overload the bootstrap procedure without affecting the distributed
-software package. 
+extend/overload the bootstrap procedure without affecting the 
+software package being distributed. 
 It merely requires a different direction for the mal_init property.
[EMAIL PROTECTED]
 The scheme also isolates the functionality embedded in modules from
 inadvertise use on non-compliant databases.
-[access control issue, how to limit what a user can do on a database?]
 @-
 Unlike previous versions of MonetDB, modules can not be unloaded. 
 Dynamic libraries are always global and, therefore, it
 is best to load them as part of the server initialization phase.
 @-
-The MAL program should be compiled with -rdynamic and -ldl.
-This enables loading the routines and finding out the address
-of a particular routine
[EMAIL PROTECTED]
 @{
 For the time being we assume that all commands are statically linked.
 @h
@@ -70,8 +64,10 @@
 mal_export int isPreloaded(str nme);
 mal_export int isLoaded(str modulename);
 #endif
[EMAIL PROTECTED]
 @-
+The MAL module should be compiled with -rdynamic and -ldl.
+This enables loading the routines and finding out the address
+of a particular routine.
 The mapping from MAL module.function() identifier to an address is
 resolved in the function getAddress. Since all modules libraries are loaded
 completely with GLOBAL visibility, it suffices to provide the internal 
function 
@@ -80,7 +76,6 @@
 a final attempt is made to locate the *.o file in
 the current directory.
 
[EMAIL PROTECTED]
 Note, however, that the libraries are reference counted. Although we
 do;t close them until end of session it seems prudent to maintain
 the consistency of this counter.
@@ -194,11 +189,6 @@
 @+ Module file loading
 The default location to search for the module is in monet_mod_path
 unless an absolute path is given.
-
-Module loading relies on the operating system's abilities to load shared 
libraries dynamically at runtime.
-
[EMAIL PROTECTED]
-- this is not entirely correct, and irrelevant, IMHO (fabian)
 Loading further relies on the Linux policy to search for the module
 location in the following order: 1) the colon-separated list of
 directories in the user's LD_LIBRARY_PATH, 2) the libraries specified
@@ -206,7 +196,6 @@
 If the module contains a routine _init, then that code is executed
 before the loader returns. Likewise the routine _fini is called just
 before the module is unloaded.
[EMAIL PROTECTED]
 
 A module loading conflict emerges if a function is redefined.
 A duplicate load is simply ignored by keeping track of modules
@@ -356,7 +345,6 @@
        filesLoaded=0;
        mal_unset_lock(mal_contextLock, "unloadModule");
 }
[EMAIL PROTECTED]
 @- 
 To speedup restart and to simplify debugging, the MonetDB server can
 be statically linked with some (or all) of the modules libraries. 
@@ -367,7 +355,7 @@
 the statically bound modules, or to enforce that each module
 comes with a known routine for which we can search.
 In the current version we use the former approach.
[EMAIL PROTECTED]
+
 The routine below turns off dynamic loading while parsing the
 command signature files.
 @c

Index: mal_debugger.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_debugger.mx,v
retrieving revision 1.218
retrieving revision 1.219
diff -u -d -r1.218 -r1.219
--- mal_debugger.mx     11 Jan 2008 10:41:31 -0000      1.218
+++ mal_debugger.mx     10 Feb 2008 23:48:45 -0000      1.219
@@ -43,15 +43,15 @@
 An illustrative session elicits the functionality offered.
 
 @example
->function test(i:int):str;
->      io.print(i);
->      i:= i*2;
->      b:= bat.new(:int,:int);
->      bat.insert(b,1,i);
->      io.print(b);
->      return test:= "ok";
->end test;
->user.test(1);
+mal>function test(i:int):str;
+mal>   io.print(i);
+mal>   i:= i*2;
+mal>   b:= bat.new(:int,:int);
+mal>   bat.insert(b,1,i);
+mal>   io.print(b);
+mal>   return test:= "ok";
+mal>end test;
+mal>user.test(1);
 [ 1 ]
 #-----------------#
 # h     t         # name
@@ -63,7 +63,7 @@
 The debugger can be entered at any time using the call mdb.start().
 An overview of the available commands is readily available.
 @example
->mdb.start();
+mal>mdb.start();
 #mdb !end main;
 mdb>help
        next             -- Advance to next statement
@@ -110,7 +110,7 @@
 A more detailed listing shows the binding to the C-routine
 and the result of type resolution.
 @example
->mdb.start();
+mal>mdb.start();
 #end main;
 mdb>l
 function user.main():int;
@@ -147,7 +147,7 @@
 the execution using the 'next' ('n') or 'step' ('s) commands,
 as shown below.
 @example
->user.test(1);
+mal>user.test(1);
 #    user.test(1);
 mdb>n
 #    io.print(i);
@@ -197,10 +197,10 @@
 The snippet below illustrates the reaction to set a break point
 on assignment to variable 'i'. 
 @example
->mdb.start();
+mal>mdb.start();
 #end main;
 mdb>
->user.test(1);
+mal>user.test(1);
 #    user.test(1);
 mdb>break i
 breakpoint on 'i' not set
@@ -319,17 +319,17 @@
 at run time. The following snippet shows the effect of patching
 the test case.
 @example
->function test(i:int):str;
->      mdb.setTrace(true);
->      io.print(i);
->      i:= i*2;
->      b:= bat.new(:int,:int);
->      bat.insert(b,1,i);
->      io.print(b);
->      mdb.setTrace(false);
->      return test:= "ok";
->end test;
->user.test(1);
+mal>function test(i:int):str;
+mal>   mdb.setTrace(true);
+mal>   io.print(i);
+mal>   i:= i*2;
+mal>   b:= bat.new(:int,:int);
+mal>   bat.insert(b,1,i);
+mal>   io.print(b);
+mal>   mdb.setTrace(false);
+mal>   return test:= "ok";
+mal>end test;
+mal>user.test(1);
 #    mdb.setTrace(_3=true)
 [ 1 ]
 #    io.print(i=1)
@@ -343,7 +343,7 @@
 [ 1,      2       ]
 #    io.print(b=<tmp_1226>)
 #   261 usec!    user.test(_2=1)
->
+mal>
 @end example
 
 The command @sc{mdb.setTimer()} toggles the performance traceing flag. 
@@ -359,17 +359,17 @@
 The routines @sc{mdb.setFlow()}, @sc{mdb.setMemory()}, and @sc{mdb.setIO()} 
 (de-)activate the other switches.
 @example
->function test(i:int):str;
->      mdb.setTimer(true);
->      io.print(i);
->      i:= i*2;
->      b:= bat.new(:int,:int);
->      bat.insert(b,1,i);
->      io.print(b);
->      mdb.setTimer(false);
->      return test:= "ok";
->end test;
->user.test(1);
+mal>function test(i:int):str;
+mal>   mdb.setTimer(true);
+mal>   io.print(i);
+mal>   i:= i*2;
+mal>   b:= bat.new(:int,:int);
+mal>   bat.insert(b,1,i);
+mal>   io.print(b);
+mal>   mdb.setTimer(false);
+mal>   return test:= "ok";
+mal>end test;
+mal>user.test(1);
 #     6 usec#    mdb.setTimer(_3=true)
 [ 1 ]
 #    43 usec#    io.print(i=1)
@@ -412,20 +412,26 @@
 Debugging a running MAL process is simplified with a few
 hooks in the kernel. It is illustrated with a short example.
 
-First open a client connection with the user using MAL as
+First open a client connection using MAL as
 preferred language. Then the state of the system can be inspected,
 in particular, the clients active can be looked up.
 @example
-> b:= clients.getLogins();
-> c:= clients.getUsers();
-> io.print(b,c);
+mal>b:= clients.getLogins();
+mal>c:= clients.getUsers();
+mal>io.print(b,c);
+#-------------------------------------------------#
+# client        login                           users     # name
+# int   str                             str       # type
+#-------------------------------------------------#
+[ 0,      "Thu Feb  7 15:57:08 2008",     "0"     ]
+[ 1,      "Thu Feb  7 15:57:11 2008",     "0"     ]
 @end example
 Locate the process you are interested in and obtain its identifier,
 say N (the first column in the list above).
 The next step is to gracefully put the running process into
 debugging mode without jeopardizing the application running.
 @example
-> clients.suspend(N);
+mal> clients.suspend(N);
 @end example
 As soon as the next MAL instruction of process N starts 
 the target process is put to sleep and the debugger gains

Index: mal_interpreter.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_interpreter.mx,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -d -r1.211 -r1.212
--- mal_interpreter.mx  8 Feb 2008 22:36:31 -0000       1.211
+++ mal_interpreter.mx  10 Feb 2008 23:48:45 -0000      1.212
@@ -1056,7 +1056,7 @@
        }
        /* Provide debugging support */
 #if @1
-       if( GDKdebug & 10 ){
+       if( GDKdebug & 10 && exceptionVar >= 0) {
                BAT *b;
                str oldmsg =0;
 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to