The JVMTI demos may or may not come bundled with your JDK installation, depending on where you get it from. They are absent (afaict) from OpenJDK installs. But in any case the demos are still available in all cases from the Oracle Download Page. Download the tarball for Mac, expand it to a directory and then browse it.
In relative folder jdk1.7.0_10/demo/jvmti
you will find the following demos:
drwxr-xr-x@ 5 tuoyo staff 170 Nov 29 19:30 compiledMethodLoad
drwxr-xr-x@ 5 tuoyo staff 170 Nov 29 19:30 gctest
drwxr-xr-x@ 6 tuoyo staff 204 Nov 29 19:30 heapTracker
drwxr-xr-x@ 5 tuoyo staff 170 Nov 29 19:30 heapViewer
drwxr-xr-x@ 5 tuoyo staff 170 Nov 29 19:30 hprof
drwxr-xr-x@ 6 tuoyo staff 204 Nov 29 19:30 minst
drwxr-xr-x@ 6 tuoyo staff 204 Nov 29 19:30 mtrace
drwxr-xr-x@ 5 tuoyo staff 170 Nov 29 19:30 versionCheck
drwxr-xr-x@ 5 tuoyo staff 170 Nov 29 19:30 waiters
Each individual demo has a source ZIP file with code and a sample makefile. You will more than likely need to tweak the makefile to get the build to work on your target system.
On a side note, you may want to look at the Java Instrumentation API, as it wraps JVMTI and provides a more convenient interface over it.