Menu

Tree [r48] /
 History

HTTPS access


File Date Author Commit
 bin 2008-10-27 kmavm [r47] Include vmrun error message on failed vprobe lo...
 cookbook 2009-05-04 elicollins [r48] fix curthrptr
 emmett 2008-10-27 kmavm [r44] Add a few missing globals.
 License.txt 2008-04-19 kmavm [r1] Initial import.
 README.emmett 2008-04-19 kmavm [r4] Remove one TODO item from the Emmett README.
 README.txt 2008-04-19 kmavm [r1] Initial import.
 install.sh 2008-04-19 kmavm [r2] Fix the install script's attempt to call Emmett...

Read Me

This is a compiler for Emmett, a simple dynamic instrumentation
language. It currently targets vp, the "portable assembly language"
for VMware's VProbes instrumentation facility.

Examples
--------

An Emmett program is a series of declarations, and probe / statement pairs.
E.g., in the canonical Hello world:

   VMM1Hz printf("Hi!\n");

We're pairing an event of interest (VMM1Hz, which happens once a second
in the VMM) with a statement to be executed (printf("Hi!\n")).

We can group statements together with { }'s:

VMM1Hz {
	var = 123;
	printf("var: %d\n", var);
}

The user can also define typed functions:

int myfunc(int arg1, string arg2)
{
	printf("%s: %d\n", arg2, arg1);
	return arg1 + 1;
}

...and subroutines:

void myfunc(int arg1, string arg2)
{
	printf("%s: %d\n", arg2, arg1);
}

if/else behave as a C programmer would expect, and integer expressions
roughly follow C's precedence and syntax.

Bugs/Limitations
----------------

VProbes' type map is currently hard-coded in Main.lhs. This should be
externally specifiable.

Currently all variables are global, and can be implicitly declared by
being assigned a given type. The only exception is function arguments,
which have function scope. It would be nice to provide block-local
variables; these could be supported using anonymous functions.

Building
--------

You'll need the Glasgow Haskell Compiler, which is available for all
popular platforms. make in the current directory should suffice.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.