From 7d45129fcaf2d4c7cd93cff9a4c1943001eb944a Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Tue, 4 Feb 2014 12:27:53 -0500 Subject: [PATCH] Fix get-custom-snapshots to conform to the docs. --- pkgs/contract-profile/main.rkt | 2 +- pkgs/profile-pkgs/profile-lib/sampler.rkt | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/contract-profile/main.rkt b/pkgs/contract-profile/main.rkt index 6d99639285..bdd28ca657 100644 --- a/pkgs/contract-profile/main.rkt +++ b/pkgs/contract-profile/main.rkt @@ -219,5 +219,5 @@ (define samples (sampler 'get-snapshots)) (define contract-samples (for/list ([s (in-list (sampler 'get-custom-snapshots))]) - (and s (vector-ref s 0)))) + (and (not (empty? s)) (vector-ref (car s) 0)))) (analyze-contract-samples contract-samples samples))))) diff --git a/pkgs/profile-pkgs/profile-lib/sampler.rkt b/pkgs/profile-pkgs/profile-lib/sampler.rkt index 75cef42d52..a130a7aeea 100644 --- a/pkgs/profile-pkgs/profile-lib/sampler.rkt +++ b/pkgs/profile-pkgs/profile-lib/sampler.rkt @@ -124,12 +124,9 @@ (unless (eq? t sampler-thread) (when custom-keys (set! custom-snapshots - (cons (let ([cms (continuation-mark-set->list* - (continuation-marks t) - custom-keys)]) - (if (null? cms) - #f - (car cms))) ; value + (cons (continuation-mark-set->list* + (continuation-marks t) + custom-keys) ; frames custom-snapshots))) (set! snapshots (cons (list* (thread-id t)