Have hidden cost reporting produce report entries directly.

Since I'm more likely to do locality than causality merging for them,
there's no reason to produce log entries instead of report entries.
This commit is contained in:
Vincent St-Amour 2012-11-25 18:34:36 -05:00
parent e4f3d8e73c
commit 8ffbaabfa6
2 changed files with 17 additions and 14 deletions

View File

@ -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

View File

@ -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))
'())))