Have inlining reporting produce report entries directly.
This commit is contained in:
parent
4933d9f00f
commit
6d7f1627b8
|
@ -180,23 +180,30 @@
|
|||
|
||||
;; Produce as many log entries as necessary.
|
||||
(define (emit e) (set! produced-entries (cons e produced-entries)))
|
||||
(define start (sub1 pos))
|
||||
(define end (+ start (syntax-span stx)))
|
||||
(define (emit-near-miss msg badness)
|
||||
(emit (missed-opt-log-entry
|
||||
kind
|
||||
(format "Missed Inlining ~a\n~a~a"
|
||||
(format-aggregation-string pruned-log)
|
||||
(if msg (format "~a\n" msg) "")
|
||||
recommendation)
|
||||
stx located-stx pos provenance
|
||||
'() '()
|
||||
;; uses ceiling to never go down to 0
|
||||
;; both badness and badness-multiplier are non-0
|
||||
(ceiling (* badness badness-multiplier)))))
|
||||
(emit (report-entry
|
||||
(list (missed-opt-report-entry
|
||||
located-stx
|
||||
(format "Missed Inlining ~a\n~a~a"
|
||||
(format-aggregation-string pruned-log)
|
||||
(if msg (format "~a\n" msg) "")
|
||||
recommendation)
|
||||
provenance
|
||||
badness
|
||||
'())) ; no irritants to highlight
|
||||
start end
|
||||
badness)))
|
||||
(define (emit-success)
|
||||
(emit (opt-log-entry
|
||||
kind
|
||||
(format "Inlining ~a" (format-aggregation-string pruned-log))
|
||||
stx located-stx pos provenance)))
|
||||
(emit (report-entry
|
||||
(list (opt-report-entry
|
||||
located-stx
|
||||
(format "Inlining ~a"
|
||||
(format-aggregation-string pruned-log))
|
||||
provenance))
|
||||
start end
|
||||
0)))
|
||||
|
||||
(define inside-hot-function?
|
||||
(and profile (memq profile-entry hot-functions)))
|
||||
|
|
|
@ -10,13 +10,14 @@
|
|||
(define (generate-report this profile)
|
||||
(define-values (TR-log mzc-log info-log) (generate-logs this))
|
||||
(define hot-functions (and profile (prune-profile profile)))
|
||||
(log->report
|
||||
(append (causality-merging
|
||||
(prune-cold-TR-failures TR-log profile hot-functions))
|
||||
(report-inlining mzc-log profile hot-functions)
|
||||
(if profile
|
||||
(report-hidden-costs info-log profile hot-functions)
|
||||
'()))))
|
||||
(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)
|
||||
'())))
|
||||
(report-inlining mzc-log profile hot-functions)))
|
||||
|
||||
|
||||
;; Returns a report-entry or #f, which means prune.
|
||||
|
|
Loading…
Reference in New Issue
Block a user