{"id":16,"date":"2008-12-30T20:59:46","date_gmt":"2008-12-31T04:59:46","guid":{"rendered":"http:\/\/www.mirandabanda.org\/cogblog\/?p=16"},"modified":"2009-01-01T18:55:44","modified_gmt":"2009-01-02T02:55:44","slug":"the-idee-fixe-and-the-perfected-profiler","status":"publish","type":"post","link":"http:\/\/www.mirandabanda.org\/cogblog\/2008\/12\/30\/the-idee-fixe-and-the-perfected-profiler\/","title":{"rendered":"The Id\u00c3\u00a9e Fixe and the Perfected Profiler"},"content":{"rendered":"<p>To justify context to stack mapping I should really show you the costs of using contexts instead of just waiving my hands and referencing <A href=\"http:\/\/lambda-the-ultimate.org\/node\/276\">the<\/a> <A href=\"http:\/\/www.iam.unibe.ch\/~ducasse\/FreeBooks\/BitsOfHistory\/BitsOfHistory.gif\">Green<\/a> <A href=\"http:\/\/www.iam.unibe.ch\/~ducasse\/FreeBooks\/BitsOfHistory\/BitsOfHistory.pdf\">Book<\/a> (thanks Glenn, Stephane and Addison Wesley!!).  That means profiling a VM.  Unless you&#8217;re a prescient genius you don&#8217;t have a hope of producing a faster VM unless you can accurately profile the one you have and figure out what has to change.  OK, yes, to an extent we can all now be prescient geniuses because fast Smalltalk and Java VMs have already been built and one can read the papers about them.  But it still helps convince one&#8217;s employer, for example, when one can point and say &quot;Look, there, I told you so.  Contexts are slow!&quot;<\/p>\n<p>Over the years I&#8217;ve implemented three VM profilers.  When implementing BrouHaHa I started off building a graphical front-end to the profil system call which was how one did profiling in the 70&#8217;s.  Here&#8217;s the profil system call.  Amazingly enough it still exsts on my Mac OS X laptop:<\/p>\n<p><code><\/p>\n<pre>NAME\r\n     profil -- control process profiling\r\n\r\nSYNOPSIS\r\n     int\r\n     profil(char *samples, size_t size, u_long offset, u_int scale);\r\n\r\nDESCRIPTION\r\n     The profil() function enables or disables program counter profiling of\r\n     the current process.  If profiling is enabled, then at every clock tick,\r\n     the kernel updates an appropriate count in the samples buffer.\r\n\r\n     The buffer samples contains size bytes and is divided into a series of\r\n     16-bit bins.  Each bin counts the number of times the program counter was\r\n     in a particular address range in the process when a clock tick occurred\r\n     while profiling was enabled.  For a given program counter address, the\r\n     number of the corresponding bin is given by the relation:\r\n\r\n           [(pc - offset) \/ 2] * scale \/ 65536\r\n\r\n     The offset parameter is the lowest address at which the kernel takes pro-\r\n     gram counter samples.  The scale parameter ranges from 1 to 65536 and can\r\n     be used to change the span of the bins.  A scale of 65536 maps each bin\r\n     to 2 bytes of address range; a scale of 32768 gives 4 bytes, 16384 gives\r\n     8 bytes and so on.  Intermediate values provide approximate intermediate\r\n     ranges.  A scale value of 0 disables profiling.\r\n\r\nRETURN VALUES\r\n     If the scale value is nonzero and the buffer samples contains an illegal\r\n     address, profil() returns -1, profiling is terminated and errno is set\r\n     appropriately.  Otherwise profil() returns 0.<\/pre>\n<p><\/code><\/p>\n<p>The C library provides a wrapper around this called moncontrol(3) which will take care of allocating the right size buffer and dumping it to a binary file called gmon.out.<\/p>\n<p>Delightfully simple, it is really nice when one displays the histogram as a graph; then ape-descendents such as myself can actually spot the expensive parts of the program because they&#8217;re where the line goes to the top of the page; something I find much easier than reading tables of numbers.  For something as simple as a Smalltalk virtual machine a call graph profiler really doesn&#8217;t tell you much you don&#8217;t already know.  The VM is essentally flat and doesn&#8217;t contain many really interesting algorithms.  It is simply an engine and what you need to know are what regions are creating internal friction.<\/p>\n<p><H2>The Id&eacute;e Fixe<\/H2><\/p>\n<p>When I went to work for ParcPlace on April 1st of 1995, which in August became ParcPlace-Digitalk, and which all too soon thereafter became DarkPlace-Dodgytalk, etc, etc, I needed a profiler to make sense of the magnificent new beast I was to work on for the next decade, the ParcPlace virtual machine HPS by Peter Deutsch, Allan Schiffman, David Ungar and Frank Jackson.  I had this fixed idea that the way one did profiling was one maintained a histogram in memory, sampling the pc periodically and updating the corresponding bin  in the histogram.  Beause I wanted to profile on Windows as well as Unix I reimplemented the profil scheme using my own interrupt handlers.  In Windows one way to get at the pc is as follows:<\/p>\n<p><code><\/p>\n<pre>#include &lt;windows.h&gt;\r\n\r\n            CONTEXT VMContext;\r\n            unsigned long pc; \r\n            VMContext.ContextFlags = CONTEXT_CONTROL | THREAD_GET_CONTEXT;\r\n            GetThreadContext(VMThread, &VMContext);\r\n            pc = VMContext.Eip;<\/pre>\n<p><\/code><\/p>\n<p>You can wrap this up in a little state machine thread that ticks along using a wait on an OS semaphore that will time out every so many milliseconds:<\/p>\n<p><code><\/p>\n<pre>\/*\r\n * This is the profiling loop.  It spins waiting for a short delay and then\r\n * sampling the pc of the main thread.  We can assume that GetThreadContext\r\n * will work if the profile thread is a higher priority than the profiled\r\n * thread and they are running on the same processor.  We use (thanks Andreas!)\r\n * SetThreadAffinityMask to force the two threads to share a processor. Other-\r\n * -wise we would have to use SuspendThread\/resumeThread on machines with more\r\n * than one hyper-thread\/core\/processor.  (See initProfile & ioControlProfile)\r\n *\/\r\nstatic DWORD WINAPI\r\nprofileStateMachine(void *ignored)\r\n{\r\n    profileState = quiescent;\r\n    while (profileState != dead) {\r\n        DWORD res = WaitForSingleObject(profileSemaphore,\r\n                                        profileState == active\r\n                                            ? profileMilliseconds\r\n                                            : INFINITE);\r\n        if (res == WAIT_TIMEOUT\r\n         && profileState == active) {\r\n            CONTEXT VMContext;\r\n            unsigned long pc;\r\n            VMContext.ContextFlags = CONTEXT_CONTROL | THREAD_GET_CONTEXT;\r\n            GetThreadContext(VMThread, &VMContext);\r\n            pc = VMContext.Eip;\r\n            if (pc &gt;= first_vm_pc && pc &lt; limit_vm_pc)\r\n                ++vm_bins[pc - first_vm_pc];\r\n            else\r\n                ++eas_bins[pc >> EAS_SCALE];\r\n        }\r\n        else if ((long)res < 0)\r\n            abortMessage(TEXT(\"WaitForSingleObject(profileSemaphore... error %ld\"), GetLastError());\r\n    }\r\n    return 0;\r\n}<\/pre>\n<p><\/code><\/p>\n<p>All very well.  Using ones own machinery the histogram bins can be 32-bits in size, relieving one of the anxiety that, at 64k samples per bin, a tight loop might overflow a bin or two.  Wrap this kind of machinery up in a few primitives and you write an interactive VM profiler in Smalltak that will allow you to profile interactively.<img src=\"http:\/\/www.mirandabanda.org\/images\/oeprofiler.jpg\" alt=\"VisualWorks VM Profiler\" \/><\/p>\n<p>Adding some support for getting the addresses of native code the VM generates one can also profile the running system, not just the VM itself.  Because a VM like HPS actually relocates and discards generated code you can move the profile data to match and hence profile the VM over long periods of time even when it is moving native code around.  Neat.<\/p>\n<p>My VisualWorks\/HPS profiler had one histogram for the VM and a separate histogram for the generated code.  HPS generates native code to a fixed size region it allocates at startup.  I alloated a few bins in  the profile to hold samples tat fell outside of these two histograms so I could know if time was being spent elsewhere even if I didnt know where.  This was fine for optimizing the virtual machine and its generated code, and that was my <a href=\"http:\/\/en.wikipedia.org\/wiki\/Idee_fixe\">obsession<\/a>, so all was well and good.<\/p>\n<p><H2>The Fatal Flaw<\/H2><\/p>\n<p>When I started on the Cog VM at Qwaq I made the mistake of plowing ahead, assuming I knew how to make a faster VM, and starting on a VM that mapped contexts to a more-or-less conventional stack organization, a la HPS (more, much more, in a subsequent post).  When this VM didn't perform as well as expected I had to do what I should have done in the first place and implemented my third VM profiler.  But the Qwaq VM is just a small part of a large substrate of C-level libraries which support the Qwaq Forums 3D virtual world.  There is the Open GL library and sound libraries and a number of external plugins and on Mac OS X nearly 90 other libraries in the entire application substrate.  Above the VM lives the Smalltalk code that is the brain of the application but the body beneath has a complex metabolism that it is my job to get into better shape.<\/p>\n<p>The trouble is that a histogram approach doesn't scale well to a 32-bit address space.  It is fine for programs with a few mnegabytes of code but when you look at the address psace on Mac OS X you'll find libraries throguhout the address space, cdoe being compiled on the fly by Open GL and the OS (for interrupt handling) and placed in the middle of the C heap or high up on the C stack.  You really need to be able to sample the pc anywhere in the entire address space.  The hack I came up with, still not able to leave the histogram behind, was to use two histograms, one with high resolution, e.g. one bin per byte, for the VM itself, and another histogram for the entire address space, mapping 8k of addresses to a single bin.  (2 raisedTo: 32) \/ (8192) * 4 = 2097152.  So three megabytes or so of memory will profile the VM and give one 8k reslution throuhout the rest of the address space.  Hence the code above:<\/p>\n<p><code><\/p>\n<pre>            if (pc >= first_vm_pc && pc < limit_vm_pc)\r\n                ++vm_bins[pc - first_vm_pc];\r\n            else\r\n                ++eas_bins[pc >> EAS_SCALE];<\/pre>\n<p><\/code><\/p>\n<p>The problem is that this is crap.  8k resolution is not up to much.  You can't tell whether the huge spike in the middle of the C library accounting for 13% of entire execution time is a call on select or a call on strcpy.  Hmph.<\/p>\n<p>Luckily finer minds than mine have evolved significantly further from their ape ancestors than I have and have figured out that a histogram at the lowest level is an idea that has run its course.  If you look at <a href=\"http:\/\/www.sun.com\/bigadmin\/content\/dtrace\/\">dtrace<\/a> and <a href=\"http:\/\/developer.apple.com\/tools\/sharkoptimize.html\">Shark<\/a> these tools are based on a buffer into which are written pc samples.  Instead fo the low level machinery maintaining the histogram it merely saves the samples.  The size of the buffer and the sampling frequency determine for how long one can profile.  Organize the buffer as a ring and one can record the samples for the immediate past, simply overwriting old samples if the buffer is smaller than needed for the profiled period.<\/p>\n<p>With the sample buffer approach the low level machinery is simpler, for example, one doesn't need to determine the start and end address of the VM, and the resolution is perfect throughout the address space.  If one does a little arithmetic (something me and my friends in <a href=\"http:\/\/www.janegoodall.org\/Gombe-Chimp-Blog\/\">Gombe<\/a> find harder than we should) one finds that the memory requirements are quite reasonable.  Five minutes of 32-bit samples at, say 1 KHz, is 4 * 5 * 60 * 1024 = 1228800 bytes, which is a lot more economical than the histgram approach.  The sample buffer is a pay-as-you-go approach.  A profiling blue pill.  Provide a bigger buffer and profile for longer.  The histogram approach is simply stiff.  Stiff as in &quot;late Dent, Arthur Dent&quot;.<\/p>\n<p><H2>The Perfected Profiler<\/H2><\/p>\n<p>Of course no profiler, no software, is perfect.  Arguably one of the hallmarks of software is its infinite perfectibility; Microsoft software being <a href=\"http:\/\/en.wikipedia.org\/wiki\/Transfinite_number\">transfinitely<\/a> perfectible.  Long may it remain so as I've still to save for my retirement.  [Do you think your employer won't catch on that you're permanently postponing putting out the perfect product? ed.]  But this one's a substantial improvement on its predecessors.<\/p>\n<p>At the bottom is machinery that samples the pc, but does so out of sync with the rest of the VM.  <a href=\"http:\/\/wiki.squeak.org\/squeak\/384\">Andreas<\/a> has been bitten by profilers before in that if one drives the profiler off the same heart beat as the system uses for things like delays one may not profile accurately and end up sampling the pc whenever the VM is responding to the latest timer interrupt.  So the profiler has its own clock:<\/p>\n<p><code><\/p>\n<pre>typedef enum { dead, nascent, quiescent, active } machine_state;\r\nmachine_state profileState = dead,\r\n              nextState = dead;\r\n\r\n#define PROFILE_USECS 666 \/* chosen to be out of phase with the delay resolution of 1000 *\/\r\nstatic volatile struct timespec proftime = { 0, PROFILE_USECS * 1000};\r\n\r\nstatic void *\r\nprofileStateMachine(void *ignored)\r\n{\r\n    profileState = quiescent;\r\n    while (profileState != dead) {\r\n        struct timespec naptime;\r\n        naptime = proftime;\r\n        while (nanosleep(&naptime, &naptime) == -1) \/* repeat *\/;\r\n        if (profileState == active)\r\n            pthread_kill(mainThread, SIGPROF);\r\n        profileState = nextState;\r\n    }\r\n    return 0;\r\n}<\/pre>\n<p><\/code><\/p>\n<p>If you try and use Unix's interval timers you'll be sorely disappointed.  The ITIMER_PROF timer, as all three available via setitimer(2) do, has only 20ms minimum period, or 50Hz.  But the signal handler for the SIGPROF signal is a reliable if annoyingly platform-dependent way to get at the pc:<\/p>\n<p><code><\/p>\n<pre>#include &lt;ucontext.h&gt;\r\n\r\n\/*\r\n * Example of 2meg buffer (512k samples) gives nearly 6 minutes of profile.\r\n *\r\n * 2 * 1024 * 1024  = 512 * 1024 pcs (each pc 4 bytes)\r\n * Sampling frequency is 1000000 usecs \/ 666 usecs = 1501 Hz (1501 pcs \/ sec)\r\n * 512 * 1024 \/ 1501 = 349 seconds = 5.8 minutes\r\n *\/\r\n\r\nstatic unsigned long *pc_buffer;\r\nstatic long pc_buffer_index;\r\nstatic long pc_buffer_size;\r\nstatic long pc_buffer_wrapped;\r\n\r\nstatic void\r\npcbufferSIGPROFhandler(int sig, siginfo_t *info, ucontext_t *uap)\r\n{\r\n#if __APPLE__ && __MACH__ && __i386__\r\n    pctype pc = uap->uc_mcontext->ss.eip;\r\n#elif __APPLE__ && __MACH__ && __ppc__\r\n    pctype pc = uap->uc_mcontext->ss.srr0;\r\n#elif __linux__ && __i386__\r\n    pctype pc = uap->uc_mcontext.gregs[REG_EIP];\r\n#else\r\n# error need to implement extracting pc from a ucontext_t on this system\r\n#endif\r\n    pc_buffer[pc_buffer_index] = pc;\r\n    if (++pc_buffer_index >= pc_buffer_size) {\r\n        pc_buffer_index = 0;\r\n        pc_buffer_wrapped = 1;\r\n    }\r\n}<\/pre>\n<p><\/code><\/p>\n<p>Now all one needs is a way to convert the samples into a histogram that pans the entire address space, and a way to label the graph.  Sparse arrays solve the first problem.  There's even a serviceable one in Squeak, SparseLargeTable, from which one can derive a SparseLargeArray that is most acceptable:<\/p>\n<p><i>QVMProfiler methods for initialization<\/i><br \/>\n<b>initialize<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008080\">&quot;Use a SparseLargeArray so we can apparently have a sample per pc in the entire address space&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;highResSamples <\/font><b>:=<\/b><font color=\"#000000\"> SparseLargeArray<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">new:<\/font><font color=\"#000000\"> (<\/font><font color=\"#800000\">2<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">raisedToInteger:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">32<\/font><font color=\"#000000\">)<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">chunkSize:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">32<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1024<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">arrayClass:<\/font><font color=\"#000000\"> Array<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">base:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">0<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">defaultValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">0<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lowResolution <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">16<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1024<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lowResSamples <\/font><b>:=<\/b><font color=\"#000000\"> Array <\/font><font color=\"#000080\">new:<\/font><font color=\"#000000\"> (<\/font><font color=\"#800000\">2<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">raisedToInteger:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">32<\/font><font color=\"#000000\">) <\/font><font color=\"#000080\">\/<\/font><font color=\"#000000\"> lowResolution.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">initializeSymbols<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">clearHistory<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;symbolsMode <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#000080\">#byAddress<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;symbolTypes <\/font><b>:=<\/b><font color=\"#000000\"> IdentitySet <\/font><font color=\"#000080\">new<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selections <\/font><b>:=<\/b><font color=\"#000000\"> ByteArray <\/font><font color=\"#000080\">new<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;highAddress <\/font><b>:=<\/b><font color=\"#000000\"> lowAddress <\/font><b>:=<\/b><font color=\"#000000\"> minSelectionIndex <\/font><b>:=<\/b><font color=\"#000000\"> maxSelectionIndex <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">0<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">toggleShowing:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">#module<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aboutToProfile <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">false<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;total <\/font><b>:=<\/b><font color=\"#000000\"> rangeTotal <\/font><b>:=<\/b><font color=\"#000000\"> startTime <\/font><b>:=<\/b><font color=\"#000000\"> elapsedTime <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">0<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gcPriorToProfile <\/font><b>:=<\/b><font color=\"#000000\"> clearPriorToProfile <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">true<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;forkProfile <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">false<br \/>\n<\/font><br \/>\n<i>QVMProfiler methods for profiling<\/i><br \/>\n<b>computeHistograms:<\/b><font color=\"#000000\"> <\/font><font color=\"#000080\">numSamples<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sampleBuffer <\/font><font color=\"#000080\">isNil<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[sampleBuffer <\/font><b>:=<\/b><font color=\"#000000\"> Bitmap <\/font><font color=\"#000080\">new:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">profileSize<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">getVMProfileSamplesInto:<\/font><font color=\"#000000\"> sampleBuffer.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cursor <\/font><font color=\"#000080\">wait<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">showWhile:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#800000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">to:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">numSamples<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">do:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008000\">[<\/font><font color=\"#000000\">:<\/font><font color=\"#000080\">i<\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">pc<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#808080\">pc<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> sampleBuffer <\/font><font color=\"#000080\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">i<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;highResSamples <\/font><font color=\"#000080\">noCheckAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">pc<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\">(<\/font><font color=\"#000000\">highResSamples <\/font><font color=\"#000080\">noCheckAt:<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">pc<\/font><font color=\"#800080\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lowResSamples <\/font><font color=\"#000080\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">pc<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">\/\/<\/font><font color=\"#000000\"> lowResolution <\/font><font color=\"#000080\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\">(<\/font><font color=\"#000000\">lowResSamples <\/font><font color=\"#000080\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">pc<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">\/\/<\/font><font color=\"#000000\"> lowResolution <\/font><font color=\"#000080\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1<\/font><font color=\"#800080\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;total <\/font><b>:=<\/b><font color=\"#000000\"> total <\/font><font color=\"#000080\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">numSamples<\/font><font color=\"#000000\"><\/p>\n<p>We use the low resolution histogram when the graph has a low resolution and is showing large regions of the address space<\/p>\n<p><img src=\"http:\/\/www.mirandabanda.org\/images\/QVMProfiler-ContextForumsLoadEntire.jpeg\" alt=\"\" \/><\/p>\n<p>and switch to using the high resolution histogram when zooming in.  The spike at the left is the VM but here's that substantial spike in the C library:<\/p>\n<p><img src=\"http:\/\/www.mirandabanda.org\/images\/QVMProfiler-ContextForumsLoadSelectSpike.jpeg\" alt=\"\" \/><\/p>\n<p><H2>Labelling Libraries<\/H2><\/p>\n<p>Labelling the graph is easy on Mac OS X because the Objective-C runtime is richly introspective and provides convenient access to loaded libraries.  One wants to be able to find the currently loaded libraries, because a rich application like Qwaq Forums may load libraries dynamically and so simply listing the libraries the VM is linked against, e.g. via otool -L (otool(1)) or on other unix systems ldd(1), won't provide the full picture.  One then needs to extract the symbols from the libraries, and possibly relocate them if the library has been relocated at load time.<\/p>\n<p>On Mac OS X, as declared in \/usr\/include\/mach-o\/dyld.h, _dyld_present() answers whether the dynamic linker is in operation, _dyld_image_count answers how many loaded libraries there are, _dyld_get_image_name answers the name of a library given its index, _dyld_get_image_vmaddr_slide answers the relocation, _dyld_get_image_header answers a library's in-memory header and getsectbynamefromheader answers a particular segment in that header.  It is a bit of a mouthful but the following plugin answers an Array containing the name, relocation, address and length of the VM and each loaded library.  The major complication is that any allocation mght invoke the garbage collector and move things so the Array result needs to be kept on the stack instead of referred to from a local variable.<\/p>\n<p><i>QVMProfileMacSupportPlugin methods for primitives<\/i><font color=\"#000000\"><font size=\"1.0\" face=\"'BitstreamVeraSans'\"><br \/>\n<\/font><\/font><b>primitiveExecutableModulesAndOffsets<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008080\">&quot;Answer an Array of quads for executable modules (the VM executable<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and loaded libraries).  Each quad is the module's name, its vm address<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; relocation in memory, the (unrelocated) start address, and the size.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">present<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">nimages<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">resultObj<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">name<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">valueObj<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">nameObjData<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">slide<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">start<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">size<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">h<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">s<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;export: <\/font><font color=\"#800000\">true<\/font><font color=\"#000000\">&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var: <\/font><font color=\"#000080\">#name<\/font><font color=\"#000000\"> type: <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'const char *'<\/font><\/font><font color=\"#000000\">&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var: <\/font><font color=\"#000080\">#nameObjData<\/font><font color=\"#000000\"> type: <\/font><font color=\"#000080\">#'char *'<\/font><font color=\"#000000\">&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var: <\/font><font color=\"#000080\">#h<\/font><font color=\"#000000\"> type: <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'const struct mach_header *'<\/font><\/font><font color=\"#000000\">&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var: <\/font><font color=\"#000080\">#s<\/font><font color=\"#000000\"> type: <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'const struct section *'<\/font><\/font><font color=\"#000000\">&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var: <\/font><font color=\"#000080\">#start<\/font><font color=\"#000000\"> type: <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'unsigned long'<\/font><\/font><font color=\"#000000\">&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;var: <\/font><font color=\"#000080\">#size<\/font><font color=\"#000000\"> type: <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'unsigned long'<\/font><\/font><font color=\"#000000\">&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">present<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">cCode:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'_dyld_present()'<\/font><\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">inSmalltalk:<\/font><font color=\"#000000\"> [<\/font><font color=\"#800000\">false<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">present<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifFalse:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#800000\">^<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">primitiveFail<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">nimages<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">cCode:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'_dyld_image_count()'<\/font><\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">inSmalltalk:<\/font><font color=\"#000000\"> [<\/font><font color=\"#800000\">0<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">resultObj<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> interpreterProxy <\/font><font color=\"#000080\">instantiateClass:<\/font><font color=\"#000000\"> interpreterProxy <\/font><font color=\"#000080\">classArray<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">indexableSize:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">nimages<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">4<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">resultObj<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">=<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">0<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#800000\">^<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">primitiveFail<\/font><font color=\"#000000\">].<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008080\">&quot;Easier keeping the damn thing on the stack than using pushRemappableOop:\/popRemappableOop.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Where is topRemappableOop when you need it?&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interpreterProxy <\/font><font color=\"#000080\">push:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">resultObj<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">0<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">to:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">nimages<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">-<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">do:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:<\/font><font color=\"#000080\">i<\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">start<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#404040\">size<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">-1<\/font><font color=\"#000000\">. <\/font><font color=\"#008080\">&quot;impossible start &amp; size&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">name<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">cCode:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'_dyld_get_image_name(i)'<\/font><\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">inSmalltalk:<\/font><font color=\"#000000\"> <\/font><font color=\"#008000\">[<\/font><font color=\"#800000\">0<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">slide<\/font><font color=\"#000000\">   <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">cCode:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'_dyld_get_image_vmaddr_slide(i)'<\/font><\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">inSmalltalk:<\/font><font color=\"#000000\"> <\/font><font color=\"#008000\">[<\/font><font color=\"#800000\">0<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">h<\/font><font color=\"#000000\">        <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">cCode:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'_dyld_get_image_header(i)'<\/font><\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">inSmalltalk:<\/font><font color=\"#000000\"> <\/font><font color=\"#008000\">[<\/font><font color=\"#800000\">0<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">h<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">~=<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">nil<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008000\">[<\/font><font color=\"#404040\">s<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">cCode:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'getsectbynamefromheader(h,SEG_TEXT,SECT_TEXT)'<\/font><\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">inSmalltalk:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\">[<\/font><font color=\"#800000\">0<\/font><font color=\"#800080\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#404040\">s<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">~=<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">nil<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800080\">[<\/font><font color=\"#404040\">start<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">cCode:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'s-&gt;addr'<\/font><\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">inSmalltalk:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">[0]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#404040\">size<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">cCode:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'s-&gt;size'<\/font><\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">inSmalltalk:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">[0]<\/font><font color=\"#800080\">]<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">valueObj<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> interpreterProxy<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">instantiateClass:<\/font><font color=\"#000000\"> interpreterProxy <\/font><font color=\"#000080\">classString<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">indexableSize:<\/font><font color=\"#000000\"> <\/font><font color=\"#008000\">(<\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">cCode:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'strlen(name)'<\/font><\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">inSmalltalk:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\">[<\/font><font color=\"#404040\">name<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">size<\/font><font color=\"#800080\">]<\/font><font color=\"#008000\">)<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interpreterProxy <\/font><font color=\"#000080\">failed<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008000\">[<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">pop:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#800000\">^<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">primitiveFail<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interpreterProxy <\/font><font color=\"#000080\">storePointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">4<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#008000\">(<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">stackValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">0<\/font><font color=\"#008000\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">withValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">valueObj<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">nameObjData<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> interpreterProxy <\/font><font color=\"#000080\">arrayValueOf:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">valueObj<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">cCode:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'memcpy(nameObjData, name, strlen(name))'<\/font><\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">inSmalltalk:<\/font><font color=\"#000000\"> <\/font><font color=\"#008000\">[<\/font><font color=\"#404040\">nameObjData<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">valueObj<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> interpreterProxy <\/font><font color=\"#000080\">signed32BitIntegerFor:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">slide<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interpreterProxy <\/font><font color=\"#000080\">failed<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008000\">[<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">pop:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#800000\">^<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">primitiveFail<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interpreterProxy <\/font><font color=\"#000080\">storePointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">4<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#008000\">(<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">stackValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">0<\/font><font color=\"#008000\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">withValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">valueObj<\/font><font color=\"#000000\">.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">valueObj<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> interpreterProxy <\/font><font color=\"#000080\">positive32BitIntegerFor:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">start<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interpreterProxy <\/font><font color=\"#000080\">failed<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008000\">[<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">pop:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#800000\">^<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">primitiveFail<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interpreterProxy <\/font><font color=\"#000080\">storePointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">4<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">2<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#008000\">(<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">stackValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">0<\/font><font color=\"#008000\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">withValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">valueObj<\/font><font color=\"#000000\">.<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">valueObj<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> interpreterProxy <\/font><font color=\"#000080\">positive32BitIntegerFor:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">size<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interpreterProxy <\/font><font color=\"#000080\">failed<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008000\">[<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">pop:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#800000\">^<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">primitiveFail<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interpreterProxy <\/font><font color=\"#000080\">storePointer:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">i<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">*<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">4<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">3<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ofObject:<\/font><font color=\"#000000\"> <\/font><font color=\"#008000\">(<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">stackValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">0<\/font><font color=\"#008000\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">withValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">valueObj<\/font><font color=\"#000000\">].<\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">resultObj<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> interpreterProxy <\/font><font color=\"#000080\">stackValue:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">0<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">^<\/font><font color=\"#000000\">interpreterProxy <\/font><font color=\"#000080\">pop:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">2<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">thenPush:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">resultObj<\/font><font color=\"#000000\"><\/p>\n<p>This is then accessed through a symbols manager that insulates the graphical tool from the platform-dependent label derivation.<\/p>\n<p><i>QVMProfilerMacSymbolsManager methods for primitives<br \/>\n<\/i><b>primitiveExecutableModulesAndOffsets<\/b><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008080\">&quot;Answer an Array of pairs of executable module names (the VM executable and<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all loaded libraries) and the vm address relocation, if any, is for the module.&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<\/font><font color=\"#008000\"><b>primitive:<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'primitiveExecutableModulesAndOffsets'<\/font><\/font><font color=\"#000000\"> <\/font><font color=\"#008000\"><b>module:<\/b><\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'QVMProfileMacSupportPlugin'<\/font><\/font><font color=\"#000000\">&gt;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">^self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">primitiveFailed<\/font><font color=\"#000000\"><\/p>\n<p>\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008080\">&quot;self basicNew primitiveExecutableModulesAndOffsets&quot;<\/font><font color=\"#000000\"><\/p>\n<p>Evaluate the comment and you see stuff like<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><i>#('\/Users\/eliot\/Cog\/stackvm\/macbuild\/Qwaq VM.app\/Contents\/MacOS\/Qwaq VM' 0 10368 1167456<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    '\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation' 0 2424351848 690349<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    '\/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Carbon' 0 2461777780 34<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    ...<\/i><\/p>\n<p>We can wrap up a module's information conveniently in a class, and have an abstract superclass for any kind of symbol in the executable:<\/p>\n<p><font color=\"#000000\">Object <\/font><font color=\"#000080\">subclass:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">#QVMPSymbol<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">instanceVariableNames:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'name address limit'<\/font><\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">classVariableNames:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">''<\/font><\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">poolDictionaries:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">''<\/font><\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">category:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'Qwaq-VMProfiling'<\/p>\n<p><\/font><\/font><font color=\"#000000\">QVMPSymbol <\/font><font color=\"#000080\">subclass:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">#QVMPExecutableModuleSymbol<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">instanceVariableNames:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'vmshift shortName'<\/font><\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">classVariableNames:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">''<\/font><\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">poolDictionaries:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">''<\/font><\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">category:<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'Qwaq-VMProfiling'<br \/>\n<\/font><\/font><br \/>\nListing the labels in a library is easily done via the Unix shell using tools like nm(1).  For example<code><\/p>\n<pre>\r\n    nm -n -f \"\/Users\/eliot\/Cog\/stackvm\/macbuild\/Qwaq VM.app\/Contents\/MacOS\/Qwaq VM\" | grep -v \" [aAU] \" >\"Qwaq VM\"'<\/pre>\n<p><\/code><br \/>\nlists the symbols in the VM in numeric order (-n) as a single module (-f for flat) instead of individual objects, removes the absolute and undeclared symbols and saves the result in the file Qwaq VM, which looks like<\/p>\n<p><code><\/p>\n<pre>00002880 T start\r\n000028aa t __start\r\n0000298c t dyld_stub_binding_helper\r\n00002998 t __dyld_func_lookup\r\n0000299e T _convertPSTRToString\r\n00002a24 T _convertPassword\r\n00002bd2 T _sqInternetGetMacintoshFileTypeAndCreatorFromkeySizeinto\r\n00002cb2 T _sqInternetConfigurationGetStringKeyedBykeySizeinto\r\n0000328c T _sqInternetConfigurationShutdown\r\n000032c0 T _sqInternetConfigurationInit\r\n...<\/pre>\n<p><\/code><\/p>\n<p>Again it is a bit of a mouthful but the Squeak code to do this and parse the output into symbols, using the OSProcess interface, is<\/p>\n<p><i>QVMProfilerMacSymbolsManager methods for parsing<br \/>\n<\/i><b>parseSymbolsFor:<\/b><font color=\"#000000\"> <\/font><font color=\"#000080\">module<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">proc<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">symtab<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">symStream<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">space<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">lf<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">shift<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">prev<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">address<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(tempDir <\/font><font color=\"#000080\">fileExists:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">module<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">shortName<\/font><font color=\"#000000\">) <\/font><font color=\"#000080\">ifFalse:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#404040\">proc<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> OSProcess <\/font><font color=\"#000080\">thisOSProcess<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">command:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'cd '<\/font><\/font><font color=\"#000080\">,<\/font><font color=\"#000000\"> tempDir <\/font><font color=\"#000080\">fullName,<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">';nm -n -f &quot;'<\/font><\/font><font color=\"#000080\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">module<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">name,<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'&quot; | grep -v &quot; [aAU] &quot; &gt;&quot;'<\/font><\/font><font color=\"#000080\">,<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">module<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">shortName,<\/font><font color=\"#000000\"> <\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'&quot;'<\/font><\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">symStream<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> (Array <\/font><font color=\"#000080\">new:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1000<\/font><font color=\"#000000\">) <\/font><font color=\"#000080\">writeStream<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">symStream<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">nextPut:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">module<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">space<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> Character <\/font><font color=\"#000080\">space<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">lf<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> Character <\/font><font color=\"#000080\">lf<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">shift<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#000080\">module<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">vmshift<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">proc<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifNotNil:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#008000\">[<\/font><font color=\"#404040\">proc<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">isComplete<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">whileFalse:<\/font><font color=\"#000000\"> <\/font><font color=\"#008000\">[<\/font><font color=\"#800080\">(<\/font><font color=\"#000000\">Delay <\/font><font color=\"#000080\">forMilliseconds:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">25<\/font><font color=\"#800080\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">wait<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">symtab<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> StandardFileStream <\/font><font color=\"#000080\">readOnlyFileNamed:<\/font><font color=\"#000000\"> (tempDir <\/font><font color=\"#000080\">fullNameFor:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">module<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">shortName<\/font><font color=\"#000000\">).<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<\/font><font color=\"#008000\">[<\/font><font color=\"#404040\">symtab<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">atEnd<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">whileFalse:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008000\">[<\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">line<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">ch<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#808080\">line<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800080\">(<\/font><font color=\"#404040\">symtab<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">upTo:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">lf<\/font><font color=\"#800080\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">readStream<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#808080\">line<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">skipSeparators<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#800080\">(<\/font><font color=\"#800000\">(<\/font><font color=\"#808080\">ch<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#808080\">line<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">peek<\/font><font color=\"#800000\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">notNil<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">and:<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">[<\/font><font color=\"#808080\">ch<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">~=<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">space<\/font><font color=\"#800000\">]<\/font><font color=\"#800080\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800080\">[<\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">symbol<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#404040\">address<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">hexFromStream:<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">line<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#404040\">shift<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">~=<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">0<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"> <\/font><font color=\"#008080\">&quot;avoid large integer arith if poss&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">[<\/font><font color=\"#404040\">address<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> maxAddressMask <\/font><font color=\"#000080\">bitAnd:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">address<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">shift<\/font><font color=\"#800000\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#404040\">prev<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">notNil<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">[<\/font><font color=\"#404040\">prev<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">limit:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">address<\/font><font color=\"#800000\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#800000\">(<\/font><font color=\"#800080\"><font size=\"0.9\" face=\"'Accuny'\">'Tt'<\/font><\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">includes:<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">line<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">peek<\/font><font color=\"#800000\">)<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">[<\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">public<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">|<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#808080\">public<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#808080\">line<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">next<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">$T<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#808080\">line<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">skipTo:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">space<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#808080\">symbol<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#00EB00\">(<\/font><font color=\"#808080\">line<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">peek<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">==<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">$L<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"> <\/font><font color=\"#EB8D00\">[<\/font><font color=\"#000000\">QVMPLabelSymbol<\/font><font color=\"#EB8D00\">]<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp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;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"> <\/font><font color=\"#EB00EB\">[<\/font><font color=\"#000000\">QVMPPublicFunctionSymbol<\/font><font color=\"#EB00EB\">]<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">ifFalse:<\/font><font color=\"#000000\"> <\/font><font color=\"#EB00EB\">[<\/font><font color=\"#000000\">QVMPPrivateFunctionSymbol<\/font><font color=\"#EB00EB\">]<\/font><font color=\"#EB8D00\">]<\/font><font color=\"#00EB00\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">new<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#808080\">symbol<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">address:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">address<\/font><font color=\"#000000\">;<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">name:<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">line<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">upToEnd<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#404040\">symStream<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">nextPut:<\/font><font color=\"#000000\"> <\/font><font color=\"#808080\">symbol<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/font><font color=\"#808080\">symbol<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">type<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">~~<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">#label<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#00EB00\">[<\/font><font color=\"#404040\">prev<\/font><font color=\"#000000\"> <\/font><b>:=<\/b><font color=\"#000000\"> <\/font><font color=\"#808080\">symbol<\/font><font color=\"#00EB00\">]<\/font><font color=\"#800000\">]<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">ifFalse:<\/font><font color=\"#000000\"> <\/font><font color=\"#008080\">&quot;first non-text symbol marks the end of the text segment&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">[<\/font><font color=\"#404040\">symtab<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">setToEnd<\/font><font color=\"#800000\">]<\/font><font color=\"#800080\">]<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;symbolsByModule <\/font><font color=\"#000080\">at:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">module<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">put:<\/font><font color=\"#000000\"> <\/font><font color=\"#404040\">symStream<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">contents<\/font><font color=\"#000000\">.<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#404040\">prev<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">ifNotNil:<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008000\">[<\/font><font color=\"#404040\">prev<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">limit:<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">module<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">limit<\/font><font color=\"#008000\">]<\/font><font color=\"#000000\">]<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">ensure:<\/font><font color=\"#000000\"> [<\/font><font color=\"#404040\">symtab<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">close<\/font><font color=\"#000000\">]<\/p>\n<p>This is one of those infinitely perfectible pieces of code I was alluding to earlier.  There is hackery I'm hiding from you here.  Parsing all those symbol files takes some ten seconds with the current VM on my mac and it is tedious to wait for the profiler to parse before opening.  So all the parsing is done in background processes.  The profiler opens immediately displaying only the list of modules.  By the time one has recovered one's composure after beholding the wonder of the profiler the symbols have been parsed.  With the symbols parsed into QVMSymbol objects we can create a list of symbols in address order, a dictionary of symbol name to symbol and produce the list of symbols to the left of the graph.<\/p>\n<p><img src=\"http:\/\/www.mirandabanda.org\/images\/QVMProfiler-ContextForumsLoadVM.jpeg\" alt=\"\" \/><\/p>\n<p>The black line is the graph of the samples where the height indicates the number of samples per bin, where a bin is some range of pcs that depend on the current scale of the graph.  Zoom in and the pc range per bin gets smaller until one can see individual pcs corresponding to individual instructions.  The pink line is the integral of the histogram over the currently displayed range of pcs, so it always starts at bottom-left and, if there are any samples, ends at top-right for 100% of the samples in the current range.  In the bottom right-hand corner you can see the proportion of the total samples this range represents, 81.98% of the total number of 19947 samples.  On the right of the graph is the integral's range and 16352 \/ 19947 is indeed about 0.8197724 or there abouts.  On the left is the histogram's range, so the highest spike contains 2991 pc samples.  Let's zoom in to look at where the integral's gradient and height are highest; that's where the time is going.  I can select using the mouse; that's the blue stripe.<\/p>\n<p><img src=\"http:\/\/www.mirandabanda.org\/images\/QVMProfiler-ContextForumsLoadVMSelected.jpeg\" alt=\"\" \/><\/p>\n<p>And of course it's the interpreter, whose main function interpret is very large and very costly.<\/p>\n<p><img src=\"http:\/\/www.mirandabanda.org\/images\/QVMProfiler-ContextForumsLoadInterpret.jpeg\" alt=\"\" \/><\/p>\n<p>But being able to see that there's a pig in the python (*)<br \/>\n<img src=\"http:\/\/www.mirandabanda.org\/images\/ElephantEnBoaConstrictor.jpg\" alt=\"Exupery's Boa digesting its Elephant\" \/><br \/>\ndoesn't help much in locating the pig's stomach.<\/p>\n<p>(*) this is from Antoine de Saint-Exupery's The Little Prince:<\/p>\n<pre>But they answered : ``Frighten ?  Why should any one be\r\nfrightened by a hat ? ''\r\n  My drawing was not a picture of a hat.  It was a picture of\r\na boa constrictor digesting an elephant.  But since the grown\r\n-ups were not able to understand it, I made another drawing :\r\nI drew the inside of the boa constrictor, so that the grown-ups\r\ncould see it clearly.  They always need to have things ex-\r\nplained.  My Drawing Number Two looked like this:<\/pre>\n<p><img src=\"http:\/\/www.mirandabanda.org\/images\/ElephantEnBoaConstrictorImage.jpg\" alt=\"\" \/><\/p>\n<pre>  The grown-ups' response, this time, was to advise me to\r\nlay aside my drawings of boa constrictors, whether from the\r\ninside or the outside, and devote myself instead to geography,\r\nhistory, arithmetic and grammar.  That is why, at the age of\r\nsix, I gave up what might have been a magnificent career as\r\na painter.  I had been disheartened by the failure of my\r\nDrawing Number One and my Drawing Number Two.\r\nGrown-ups never understand anything by themselves, and\r\nit is tiresome for children to be always and forever explaining\r\nthings to them.<\/pre>\n<p>What we need is more detail within the _interpret function so that we can distinguish activities like bytecode dispatch and particular bytecodes.  We can add labels that will show up in the executable using asm statements.  We'll modify the Slang translator, whose job it is to translate the Smalltalk simulation of the virtual machine into the C which is cmpiled to produce the actual VM, to insert macros at relevant points, for example particular bytecodes:<\/p>\n<p><code><\/p>\n<pre>    currentBytecode = byteAtPointer(++localIP);\r\n    while (1) {\r\n        VM_LABEL(0bytecodeDispatch);\r\n        switch (currentBytecode) {\r\n        case 0:\r\n            \/* pushReceiverVariableBytecode *\/\r\n            {\r\n\r\n                VM_LABEL(0pushReceiverVariableBytecode);\r\n                                \/* begin fetchNextBytecode *\/\r\n                currentBytecode = byteAtPointer(++localIP);\r\n                \/* begin pushReceiverVariable: *\/\r\n                \/* begin internalPush: *\/\r\n                longAtPointerput(localSP -= BytesPerWord, longAt(((longAt(localFP + FoxReceiver)) + BaseHeaderSize) + ((0 & 15) << ShiftForWord)));\r\n            }\r\n;\r\n            break;\r\n        case 1:\r\n            \/* pushReceiverVariableBytecode *\/\r\n            {\r\n\r\n                VM_LABEL(1pushReceiverVariableBytecode);\r\n                                \/* begin fetchNextBytecode *\/\r\n                currentBytecode = byteAtPointer(++localIP);\r\n                \/* begin pushReceiverVariable: *\/<\/pre>\n<p><\/code><\/p>\n<p>We can then cause the macros to expand into labels in the assembler that the C compler generates:<br \/>\n<code><\/p>\n<pre>#ifdef __GNUC__\r\n# define VM_LABEL(foo) asm(\"\\n.globl L\" #foo \"\\nL\" #foo \":\")\r\n#endif \r\n\r\n#if !defined(VM_LABEL)\r\n# define VM_LABEL(foo) 0\r\n#endif<\/pre>\n<p><\/code><\/p>\n<p>and produce<\/p>\n<p><code><\/p>\n<pre>.globl L0bytecodeDispatch\r\nL0bytecodeDispatch:\r\n# End ASM\r\n                                # LOE ebx ebp edi\r\nL_B270.6:                       # Preds L_B270.5\r\n        cmpl      $255, %edi                                    #1562.3\r\n        ja        L_B270.5      # Prob 82%                      #1562.3\r\n                                # LOE ebx ebp edi\r\nL_B270.7:                       # Preds L_B270.6                # Infreq\r\n        movl      L..1..TPKT.4_0.0.318(,%edi,4), %edx           #1562.3\r\n        lea       L._1._interpret.TAG.IGBASE.0.318, %eax        #1562.3\r\n        addl      %eax, %edx                                    #1562.3\r\n        jmp       *%edx                                         #1562.3<\/pre>\n<p><\/code><\/p>\n<p>Now we can identify distinct activities:<br \/>\n<img src=\"http:\/\/www.mirandabanda.org\/images\/QVMProfiler-ContextForumsLoadInterpretLabelled.jpeg\" alt=\"\" \/><\/p>\n<p>Here for example is bytecode dispatch:<br \/>\n<img src=\"http:\/\/www.mirandabanda.org\/images\/QVMProfiler-ContextForumsLoadInterpretBytecodeDispatch.jpeg\" alt=\"\" \/><\/p>\n<p>So I can tell that the bounds check that over the last thirty years I've found that C compilers always fail to spot is unnecessary, because all 256 cases in the <code>switch (currentBytecode)<\/code> case statement are present<br \/>\n<code><\/p>\n<pre>        cmpl      $255, %edi                                    #1562.3\r\n        ja        L_B270.5      # Prob 82%                      #1562.3<\/pre>\n<p><\/code><br \/>\ncosts nearly two percent of entire execution time, and that the 5.8% of execution time in bytecode dispatch is of the same order as the 7% in message lookup.  And of course generating a report form the data makes sense:<br \/>\n\t<code><\/p>\n<pre>\t\/Users\/eliot\/Qwaq\/QFCI1.2.28.app\/Contents\/MacOS\/Qwaq VM eem 12\/30\/2008 18:23\r\n\r\n\tgc prior.  clear prior.  \r\n\t13.898 seconds; sampling frequency 1435 hz\r\n\t11127 samples in the Interpreter\t(19947 samples in the entire program)  55.78% of total\r\n\r\n\t% of interpret (% of total)\t\t\t\t\t\t\t\t\t(samples) (cumulative)\r\n\t10.34%    (  5.77%)\tL0internalActivateNewMethod\t\t\t\t(1151)\t(10.34%)\r\n\t10.18%    (  5.68%)\tL0bytecodeDispatch\t\t\t\t\t\t(1133)\t(20.53%)\r\n\t  7.69%    (  4.29%)\tL0lookupInMethodCacheSelclass\t\t\t\t(856)\t\t(28.22%)\r\n\t  5.44%    (  3.03%)\tL0normalSend\t\t\t\t\t\t\t(605)\t\t(33.66%)\r\n\t  4.05%    (  2.26%)\tL0internalStoreContextRegisters\t\t\t\t(451)\t\t(37.71%)\r\n\t  3.57%    (  1.99%)\tL0internalExecuteNewMethod\t\t\t\t(397)\t\t(41.28%)\r\n\t  3.28%    (  1.83%)\tL0commonReturn\t\t\t\t\t\t(365)\t\t(44.56%)\r\n\t  2.84%    (  1.58%)\tL0pushReceiverVariableBytecode\t\t\t\t(316)\t\t(47.40%)\r\n\t  2.76%    (  1.54%)\tL0internalFetchContextRegisters\t\t\t\t(307)\t\t(50.16%)\r\n\t  2.53%    (  1.41%)\tL0pushTemporaryVariableBytecode\t\t\t(281)\t\t(52.68%)\r\n\t  2.20%    (  1.23%)\tL0recycleContextIfPossible\t\t\t\t\t(245)\t\t(54.88%)\r\n\t  2.02%    (  1.13%)\tL0returnTopFromMethod\t\t\t\t\t(225)\t\t(56.91%)\r\n\t  1.82%    (  1.02%)\tL0internalQuickCheckForInterrupts\t\t\t(203)\t\t(58.73%)\r\n\t  1.80%    (  1.00%)\tL1internalFetchContextRegisters\t\t\t\t(200)\t\t(60.53%)<\/pre>\n<p><\/code><\/p>\n<p>Fully 5.8% of entire execution time is in method activation.  Now we have a profiler that can drill down let me put this in stark contrast using an activation-return benchmark, nfib, that in Squeak is called benchFib:<\/p>\n<p><i>Integer methods for benchmarks<\/i><br \/>\n<b>benchFib<\/b><font color=\"#000000\">  <\/font><font color=\"#008080\">&quot;Handy send-heavy benchmark&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008080\">&quot;(result \/\/ seconds to run) = approx calls per second&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008080\">&quot; | r t |<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  t := Time millisecondsToRun: [r := 26 benchFib].<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  (r * 1000) \/\/ t&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#008080\">&quot;138000 on a Mac 8100\/100&quot;<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#800000\">^<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">self<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">&lt;<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">2<\/font><font color=\"#000000\"><br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">ifTrue:<\/font><font color=\"#000000\"> [<\/font><font color=\"#800000\">1<\/font><font color=\"#000000\">]<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/font><font color=\"#000080\">ifFalse:<\/font><font color=\"#000000\"> [<\/font><font color=\"#008000\">(<\/font><font color=\"#800000\">self<\/font><font color=\"#000080\">-<\/font><font color=\"#800000\">1<\/font><font color=\"#008000\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">benchFib<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#008000\">(<\/font><font color=\"#800000\">self<\/font><font color=\"#000080\">-<\/font><font color=\"#800000\">2<\/font><font color=\"#008000\">)<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">benchFib<\/font><font color=\"#000000\"> <\/font><font color=\"#000080\">+<\/font><font color=\"#000000\"> <\/font><font color=\"#800000\">1<\/font><font color=\"#000000\">]<br \/>\n<\/font><br \/>\nBecause the recursing arm also adds one the result is the number of sends needed to evaluate it.  10 benchFib is 177 and required 177 sends, creating 177 activations, to compute it.  nfib is a great way to roughly compare send\/return performance across language implementations.  Fnd a value for which the implementation takes a few seconds to evaluate nfib, then divide the result by the time to get activations per second.  The vanilla Squeak VM running on my MacBook Pro (2.16GHz Intel Core Duo) does about 8.1 million sends per second.  gcc-compiled C (-O1) does about 121 million sends per second, fifteen times faster than the vanilla Squeak VM.  Of course that wonderfully fast C code also claims that nfib of 44 is -2025160957 \ud83d\ude09<\/p>\n<p>So what does e.g. 39 benchFib look like in the VM?<br \/>\n<img src=\"http:\/\/www.mirandabanda.org\/images\/QVMProfiler-Context39benchFib.jpeg\" alt=\"\" \/><\/p>\n<p>Here's where nearly a quarter of entire execution time is going, activation:<\/p>\n<p><img src=\"http:\/\/www.mirandabanda.org\/images\/QVMProfiler-Context39benchFibActivation.jpeg\" alt=\"\" \/><\/p>\n<p>In the gory detail:<br \/>\n<code><\/p>\n<pre>\t\/Users\/eliot\/Qwaq\/QFCI1.2.28.app\/Contents\/MacOS\/Qwaq VM eem 12\/30\/2008 18:31\r\n\r\n\t39 benchFib\r\n\r\n\tgc prior.  clear prior.  \r\n\t25.496 seconds; sampling frequency 1465 hz\r\n\t37317 samples in the Interpreter\t(37347 samples in the entire program)  99.92% of total\r\n\r\n\t% of interpret (% of total)\t\t\t\t\t\t\t\t(samples) (cumulative)\r\n\t13.46%    (13.45%)\tL0internalActivateNewMethod\t\t\t(5023)\t(13.46%)\r\n\t12.90%    (12.89%)\tL0bytecodeDispatch\t\t\t\t\t(4815)\t(26.36%)\r\n\t  6.40%    (  6.39%)\tL0internalStoreContextRegisters\t\t\t(2387)\t(32.76%)\r\n\t  5.99%    (  5.99%)\tL0commonReturn\t\t\t\t\t(2237)\t(38.75%)\r\n\t  5.54%    (  5.53%)\tL0lookupInMethodCacheSelclass\t\t\t(2067)\t(44.29%)\r\n\t  5.53%    (  5.53%)\tL0bytecodePrimAdd\t\t\t\t\t(2065)\t(49.83%)\r\n\t  5.38%    (  5.37%)\tL0normalSend\t\t\t\t\t\t(2007)\t(55.21%)\r\n\t  4.95%    (  4.95%)\tL0bytecodePrimSubtract\t\t\t\t(1847)\t(60.15%)\r\n\t  4.62%    (  4.61%)\tL0pushReceiverBytecode\t\t\t\t(1723)\t(64.77%)\r\n\t  4.21%    (  4.20%)\tL0internalFetchContextRegisters\t\t\t(1570)\t(68.98%)\r\n\t  3.94%    (  3.94%)\tL0pushConstantOneBytecode\t\t\t(1471)\t(72.92%)\r\n\t  3.93%    (  3.92%)\tL0recycleContextIfPossible\t\t\t\t(1465)\t(76.85%)\r\n\t  3.08%    (  3.08%)\tL1internalFetchContextRegisters\t\t\t(1151)\t(79.93%)\r\n\t  2.86%    (  2.86%)\tL0internalQuickCheckForInterrupts\t\t(1068)\t(82.79%)\r\n\t  2.81%    (  2.81%)\tL0pushConstantTwoBytecode\t\t\t(1049)\t(85.60%)\r\n\t  2.63%    (  2.63%)\tL0sendLiteralSelectorBytecode\t\t\t(981)\t\t(88.23%)\r\n\t  2.33%    (  2.33%)\tL0returnTopFromMethod\t\t\t\t(869)\t\t(90.56%)\r\n\t  2.22%    (  2.21%)\tL0internalExecuteNewMethod\t\t\t(827)\t\t(92.78%)\r\n\t  2.07%    (  2.07%)\tL0booleanCheat\t\t\t\t\t\t(774)\t\t(94.85%)\r\n\t  1.68%    (  1.68%)\tL0pushReceiverVariableBytecode\t\t\t(626)\t\t(96.53%)\r\n\t  1.46%    (  1.46%)\tL0longUnconditionalJump\t\t\t\t(546)\t\t(97.99%)\r\n\t  1.17%    (  1.17%)\tL0bytecodePrimLessThan\t\t\t\t(436)\t\t(99.16%)\r\n\t  0.84%    (  0.84%)\tL0storePointerofObjectwithValue\t\t\t(312)\t\t(100.0%)\r\n\t  0.00%    (  0.00%)\t...others...\t\t\t\t\t\t\t(1)\t\t(100.0%)<\/pre>\n<p><\/code><\/p>\n<p>we can charge all of<br \/>\n\t<code><\/p>\n<pre>\tL0internalActivateNewMethod\r\n\tL0internalStoreContextRegisters\r\n\tL0commonReturn\r\n\tL0internalFetchContextRegisters<\/pre>\n<p><\/code><br \/>\nto activation\/return for a grand total of 30.03% of entire execution time.<\/p>\n<p>The cost here is contexts.  For every send a new context must be allocated, and, adding insult to injury, the receiver and arguments must be copied from the caller context to the callee context, something that a stack organization eliminates.  But that's for the next post.  Happy new year!<\/body><\/html><\/p>\n<div class=\"pdf24Plugin-cp\"> \t<form name=\"pdf24Form0\" method=\"post\" action=\"https:\/\/doc2pdf.pdf24.org\/wordpress.php\" target=\"pdf24PopWin\" onsubmit=\"var pdf24Win = window.open('about:blank', 'pdf24PopWin', 'resizable=yes,scrollbars=yes,width=600,height=250,left='+(screen.width\/2-300)+',top='+(screen.height\/3-125)+''); pdf24Win.focus(); if(typeof pdf24OnCreatePDF === 'function'){void(pdf24OnCreatePDF(this,pdf24Win));}\"> \t\t<input type=\"hidden\" name=\"blogCharset\" value=\"Cw1x07UAAA==\" \/><input type=\"hidden\" name=\"blogPosts\" value=\"MwQA\" \/><input type=\"hidden\" name=\"blogUrl\" value=\"yygpKbDS1y8vL9fLzSxKzEtJTAIRevlF6frJ+elJOfnpAA==\" \/><input type=\"hidden\" name=\"blogName\" value=\"c85PV3DKyU8HAA==\" \/><input type=\"hidden\" name=\"blogValueEncoding\" value=\"gzdeflate base64\" \/><input type=\"hidden\" name=\"postId_0\" value=\"MzQDAA==\" \/><input type=\"hidden\" name=\"postTitle_0\" value=\"C8lIVfBMOdx8aGWqgltmRapCYl6KQglQMCC1KC01uSQ1RSGgKD8tMye1CAA=\" \/><input type=\"hidden\" name=\"postLink_0\" value=\"FcpLDoAgDADRE5Uiboy34VOgCVrSNMHjq5tZvEw3myfiWstdrPEuMf1xog2ztDSkYfD+wC3g7tE6ARciqPwQfCf8MkkrZaMCU6XyIMUX\" \/><input type=\"hidden\" name=\"postAuthor_0\" value=\"S0zJzcwDAA==\" \/><input type=\"hidden\" name=\"postDateTime_0\" value=\"MzIwsNA1NNI1NlAwMrAyNLIyMQMA\" \/><input type=\"hidden\" name=\"postContent_0\" value=\"7X3rWhs5tujvyfflHTRkdzBp4ysXQxLmI4Qk7IHABDq99+nTmy1XyXY1VaXqUhXGPZf\/+w3Ov\/OK5xHOWktSVdlgbDAG0g0zHYyrtCQtLa27tN5EWyeS\/ZKqxOsMmCPDRFwkLJFMJdw5YwGPIi\/ssj2mejL1XRYL7vsD\/KvPBjJlSU9AK5UoJjssVfiuAaKYF6pEcBefYAesz71zfCEYsB4PXcXgHwDYEbEIHXzwZpv14O+3C70kiTarVZ8HbZcvQx\/LqZ94AU9ERcbdaihdUW2sry1swaM3Vb51qWW\/3694PKikodcWFadX\/ZebOlwpUf0QC\/FOyjNVfecl6rDzyVOJjAfDf1W6Xmdh6yO8Gs4FfOQCeHyNoJcSQMeZYh99EYZldpyICL4QhJ5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VLznVhpxp9XVa\/bUVcqcaADCY3MNZm8qZVqqvrtcQUAsTqK1ncKPg4txYyUZCOXQ8TA7DIS9afWUdfbXrDdwSGYhmAURjohethFsUgaxVWqsZkFqr4GptTeW4sp7j9Q0cQuavXMs9r6216ZxppXptrQWQWkDcGzmkegFS\/RJqTvpyCDW1lQ0EsVpZy32ea80cxJomTxS0+x70jWSG2c2yuNylDe2nbLXIIWnANAtgmtd6GEuttQ1sv1Er+nAbjYI3uj7JhwxoIKfrRgOjA5mXcz2HUdObpS0lcOgQMMoTs13W11eo6Uq+tnX0uGZOybWpXMiltQZ5kDfWcrd+PWOb5rPmGWH3hxDFgUdHavx\/T4OIRrK6oiGsE2MyEOoFZ3p9\/dLG3RdKnYCGozlnUwPYyF3PtYI3nD7TgiLHNIkpsnNI54IwH\/ArKp\/aG95YIgKpVWoZoFotB0SO2kqlQrm7Cj5YEVIvtBvrlrUnkHo6g93HgyRjY1rXSBoY2AQxQG8U+ftQkyu36bh4IibUZmqJVfFRUUeLgCKHdLADpGqzhqGXsUpUpXgWCaOUzB67c\/RQyBrAADjl9ePugz5C0PbNcxakKtF5oZSlLtyyPioDthOluYek6lPe4S8pxomNrUW0S7YQID6lLMoMliMjD3Rum\/KrPc5x1qVJfKRvhf22TEebdGYrqcUcvd7OGQM9D5Tt37S9IvCMaIjJRCZf3JzGsGf68J4dLJSFVtYn0McGNFcMkP\/5TbUt3QEsRC8JfE0U\/x8=\" \/> \t\t<a href=\"https:\/\/www.pdf24.org\" target=\"_blank\" title=\"www.pdf24.org\" rel=\"nofollow\"><img src=\"http:\/\/www.mirandabanda.org\/cogblog\/wp-content\/plugins\/pdf24-post-to-pdf\/img\/pdf_32x32.png\" alt=\"\" border=\"0\" height=\"32\" \/><\/a> \t\t<span class=\"pdf24Plugin-cp-space\">&nbsp;&nbsp;<\/span> \t\t<span class=\"pdf24Plugin-cp-text\">Send article as PDF<\/span> \t\t<span class=\"pdf24Plugin-cp-space\">&nbsp;&nbsp;<\/span> \t\t<input class=\"pdf24Plugin-cp-input\" style=\"margin: 0px;\" type=\"text\" name=\"sendEmailTo\" placeholder=\"Enter email address\" \/> \t\t<input class=\"pdf24Plugin-cp-submit\" style=\"margin: 0px;\" type=\"submit\" value=\"Send\" \/> \t<\/form> <\/div>","protected":false},"excerpt":{"rendered":"<p>To justify context to stack mapping I should really show you the costs of using contexts instead of just waiving my hands and referencing the Green Book (thanks Glenn, Stephane and Addison Wesley!!). That means profiling a VM. Unless you&#8217;re a prescient genius you don&#8217;t have a hope of producing a faster VM unless you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/posts\/16"}],"collection":[{"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":0,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/posts\/16\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/media?parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/categories?post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mirandabanda.org\/cogblog\/wp-json\/wp\/v2\/tags?post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}