Make contract profiler robust against empty stack traces.

This commit is contained in:
Vincent St-Amour 2013-08-08 10:24:29 -04:00
parent 8f50e4a519
commit bc877477bf

View File

@ -137,7 +137,9 @@
;; maps pos-neg edges (pairs) to lists of samples
[edge-samples (hash)])
([s (in-list live-contract-samples)])
(match-define (list blame thread-id timestamp stack-trace ...) s)
(match-define (list blame sample-time stack-trace ...) s)
(when (empty? stack-trace)
(log-warning "contract profiler: sample had empty stack trace"))
(define pos (blame-positive blame))
(define neg (blame-negative blame))
;; We consider original blames and their swapped versions to be the same.