[virtmach] Your VM

Michal Gajda <korek@icm.edu.pl> Michal Gajda <korek@icm.edu.pl>
Wed, 30 May 2001 17:50:16 +0200 (CEST)


On Wed, 30 May 2001, [iso-8859-1] Mickaël Pointier wrote:

> > In debug mode the traceop() macro expands
> > to a print statement that prints out the
> > instruction exactly as it was exicuted.
> > (including the args.)
>
> Of course, but it means you cannot dynamically switch to/from debug mode.
> Since debug is generaly _very_ slow, it can be good to have special opcodes
> to switch to debug mode at a particular location where you want to debug,
> and switch back to fast(release) mode after that part.

But would the switch be in separate file,
then you can include it in different functions placed in files:
one implementing usual loop, the others debugging and profiling.
The only penalty would be bigger executable size.
Unfortunately you cannot do it for dynamically loaded primitives I think.

	Greetings :-)
		Michal Gajda
		korek@icm.edu.pl
		*knowledge-hungry student*