anchor.diff:  (defun get-resource-usage ()
     (with-foreign-object (rusage 'rusage)
       (getrusage +rusage-self+ rusage)
  -    (with-foreign-slots ((stime majflt nvcsw nivcsw) rusage rusage)
  +    (with-foreign-slots ((stime minflt majflt nvcsw nivcsw) rusage rusage)
         (with-foreign-slots ((sec usec) stime timeval)
  -        (values (+ (* sec 1000000000) (* usec 1000))
  -                majflt nvcsw nivcsw)))))
  +        (values (+ (* sec 1000000) usec) minflt majflt nvcsw nivcsw)))))
   
   (define-event :system-time "System time")
  -
  -;;;; Profiling
  -
  +(define-event :page-faults "Page faults")
  +(define-event :page-reclaims "Page reclaims")
  +(define-event :vcsw "Voluntary context-switches")
  +(define-event :ivcsw "Involuntary context-switches")
  +
  +(define-event :cpu-usage "CPU usage")
   
   ;;;; Interface
   
  
positive.code:              ((< n 1000000) (format nil "~,2F us" (/ n 1000)))
               ((< n 1000000000) (format nil "~,2F ms" (/ n 1000000)))
               (t (format nil "~,3F s" (/ n 1000000000)))))
      (t
         (cond ((>= n 1000000000) (format nil "~13E" n))
               ((integerp n) (format nil "~:D" n))
  
negative.code: (defun %call-with-measurements (event-set function consumer)
    (check-type function function)
    (with-event-set-slots event-set (handle mutator-values gc-values)
      (let ((real-nsec-total 0) (real-nsec-gc 0) tmp-real-nsec-before-gc
            (user-nsec-total 0) (user-nsec-gc 0) tmp-user-nsec-before-gc
            system-usec-total (system-usec-gc 0) tmp-system-usec-before-gc
            page-reclaims-total (page-reclaims-gc 0) tmp-page-reclaims-before-gc
            page-faults-total (page-faults-gc 0) tmp-page-faults-before-gc
            vcsw-total (vcsw-gc 0) tmp-vcsw-before-gc
            ivcsw-total (ivcsw-gc 0) tmp-ivcsw-before-gc
            (gc-count 0)
            return-values)
        (declare (type (signed-byte #.(* 8 (foreign-type-size :long-long)))
                       real-nsec-total user-nsec-total)
                 (dynamic-extent return-values))
        (setf (values system-usec-total page-reclaims-total page-faults-total
                      vcsw-total ivcsw-total)
              (get-resource-usage))
        (with-instrumented-gc
            (:before
             (papi-accum handle mutator-values)
             (incf gc-count)
             (setf (values tmp-system-usec-before-gc
                           tmp-page-reclaims-before-gc
                           tmp-page-faults-before-gc
                           tmp-vcsw-before-gc
                           tmp-ivcsw-before-gc)
                   (get-resource-usage))
             (setq tmp-real-nsec-before-gc (papi-get-real-nsec))
             (setq tmp-user-nsec-before-gc (papi-get-virt-nsec)))
            (:after
             (papi-accum handle gc-values)
             (incf real-nsec-gc
                   (- (papi-get-real-nsec) tmp-real-nsec-before-gc))
             (incf user-nsec-gc
                   (- (papi-get-virt-nsec) tmp-user-nsec-before-gc))
             (multiple-value-bind (stime reclaims faults vcsw ivcsw)
                 (get-resource-usage)
               (incf system-usec-gc (- stime tmp-system-usec-before-gc))
               (incf page-reclaims-gc (- reclaims tmp-page-reclaims-before-gc))
               (incf page-faults-gc (- faults tmp-page-faults-before-gc))
               (incf vcsw-gc (- vcsw tmp-vcsw-before-gc))
               (incf ivcsw-gc (- ivcsw tmp-ivcsw-before-gc))))
          (locally (declare (optimize (speed 3) (safety 0)))
            (papi-start handle)
            (setq user-nsec-total (papi-get-virt-nsec))
  