diff --git a/collects/typed-racket/optimizer/tool/hidden-costs.rkt b/collects/typed-racket/optimizer/tool/hidden-costs.rkt index 6219a35224..e7be29aa7f 100644 --- a/collects/typed-racket/optimizer/tool/hidden-costs.rkt +++ b/collects/typed-racket/optimizer/tool/hidden-costs.rkt @@ -34,13 +34,16 @@ #:when (info-log-entry? info-entry) #:when (equal? (log-entry-kind info-entry) kind) #:when (inside-us? (log-entry-pos info-entry))) - (emit (missed-opt-log-entry - "" ; kind not used at this point - message - (log-entry-located-stx info-entry) - (log-entry-located-stx info-entry) - (log-entry-pos info-entry) 'typed-racket - '() '() + (define start (sub1 (log-entry-pos info-entry))) + (define end (+ start (syntax-span (log-entry-stx info-entry)))) + (emit (report-entry + (list (missed-opt-report-entry + (log-entry-located-stx info-entry) + message + 'typed-racket + badness + '())) ; no irritants to highlight + start end badness))))) (check-hidden-cost diff --git a/collects/typed-racket/optimizer/tool/report.rkt b/collects/typed-racket/optimizer/tool/report.rkt index d3b0b124b1..f71fb4e59b 100644 --- a/collects/typed-racket/optimizer/tool/report.rkt +++ b/collects/typed-racket/optimizer/tool/report.rkt @@ -12,13 +12,13 @@ (define hot-functions (and profile (prune-profile profile))) (append (log->report - (append (causality-merging - (prune-cold-TR-failures TR-log profile hot-functions)) - (if profile - (report-hidden-costs info-log profile hot-functions) - '()))) - (if profile ; inlining reports have too low a SNR to be shown w/o profiling - (report-inlining mzc-log profile hot-functions) + (causality-merging + (prune-cold-TR-failures TR-log profile hot-functions))) + (if profile + ;; inlining and hidden cost reports have too low a SNR to be shown + ;; w/o profiling-based pruning + (append (report-inlining mzc-log profile hot-functions) + (report-hidden-costs info-log profile hot-functions)) '())))