code: function(context, functionName, callback) {
          context = context || global;
          context['_old' + functionName] = context[functionName];
          context[functionName] = function() {
              callback.call(this, printStackTrace());
              return context['_old' + functionName].apply(this, arguments);
          };
          context[functionName]._instrumented = true;
      }
docs: Given a context, function name, and callback function, overwrite it so that it calls
  printStackTrace() first with a callback and then runs the rest of the body.
  
  @param {Object} context of execution (e.g. window)
  @param {String} functionName to instrument
  @param {Function} function to call with a stack trace on invocation