Don't track provenance at the log entry level.
Not necessary anymore.
This commit is contained in:
parent
928ea23a12
commit
96078c9da6
|
@ -24,7 +24,7 @@
|
|||
(define (anyone-listening?) (log-level? TR-logger TR-logging-level))
|
||||
|
||||
;; msg is for consumption by the DrRacket tool
|
||||
(struct log-entry (kind msg stx located-stx pos provenance) #:prefab)
|
||||
(struct log-entry (kind msg stx located-stx pos) #:prefab)
|
||||
;; for optimizations only (not missed optimizations, those are below)
|
||||
(struct opt-log-entry log-entry () #:prefab)
|
||||
|
||||
|
@ -32,8 +32,7 @@
|
|||
(define (log-optimization kind msg stx)
|
||||
(when (anyone-listening?)
|
||||
(emit-log-message
|
||||
(opt-log-entry kind msg stx (locate-stx stx) (syntax-position stx)
|
||||
'typed-racket))))
|
||||
(opt-log-entry kind msg stx (locate-stx stx) (syntax-position stx)))))
|
||||
|
||||
;;--------------------------------------------------------------------
|
||||
|
||||
|
@ -62,7 +61,6 @@
|
|||
(emit-log-message
|
||||
(missed-opt-log-entry kind msg
|
||||
stx (locate-stx stx) (syntax-position stx)
|
||||
'typed-racket
|
||||
irritants '() 1)))))
|
||||
|
||||
|
||||
|
@ -78,8 +76,7 @@
|
|||
(when (anyone-listening?)
|
||||
(emit-log-message
|
||||
;; no actual message, since it's not meant for user consumption
|
||||
(info-log-entry kind "" stx (locate-stx stx) (syntax-position stx)
|
||||
'typed-racket))))
|
||||
(info-log-entry kind "" stx (locate-stx stx) (syntax-position stx)))))
|
||||
|
||||
;;--------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
(log-entry-stx parent) ; we report the outermost one
|
||||
(log-entry-located-stx parent)
|
||||
(log-entry-pos parent)
|
||||
(log-entry-provenance parent)
|
||||
|
||||
(remove-duplicates
|
||||
(append (remove (log-entry-stx child)
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
;; prune this entry from the logs, but return what we produced so far
|
||||
(define (prune) (escape produced-entries))
|
||||
(match (car log) ; events are grouped, first element is representative
|
||||
[(log-entry kind msg stx located-stx pos provenance)
|
||||
[(log-entry kind msg stx located-stx pos)
|
||||
|
||||
;; #f if no profiling info is available for this function
|
||||
;; takes in either a single pos number or a pair of numbers (line col)
|
||||
|
@ -190,7 +190,7 @@
|
|||
(format-aggregation-string pruned-log)
|
||||
(if msg (format "~a\n" msg) "")
|
||||
recommendation)
|
||||
provenance
|
||||
'inlining
|
||||
badness
|
||||
'())) ; no irritants to highlight
|
||||
start end
|
||||
|
@ -201,7 +201,7 @@
|
|||
located-stx
|
||||
(format "Inlining ~a"
|
||||
(format-aggregation-string pruned-log))
|
||||
provenance))
|
||||
'inlining))
|
||||
start end
|
||||
0)))
|
||||
|
||||
|
|
|
@ -85,7 +85,6 @@
|
|||
(inliner-log-entry kind kind
|
||||
forged-stx forged-stx
|
||||
(syntax-position forged-stx)
|
||||
'mzc
|
||||
evt))
|
||||
|
||||
(define inlining-event-regexp
|
||||
|
|
|
@ -25,9 +25,10 @@
|
|||
;; Returns a report-entry or #f, which means prune.
|
||||
(define (log-entry->report-entry l)
|
||||
(match l
|
||||
[(log-entry kind msg stx located-stx (? number? pos) provenance)
|
||||
[(log-entry kind msg stx located-stx (? number? pos))
|
||||
(define start (sub1 pos))
|
||||
(define end (+ start (syntax-span stx)))
|
||||
(define provenance 'typed-racket)
|
||||
;; When we first create report entries, they have a single sub.
|
||||
(report-entry (list (if (opt-log-entry? l)
|
||||
(opt-report-entry located-stx msg provenance)
|
||||
|
@ -76,9 +77,9 @@
|
|||
(/ (node-self (car profile-entry)) total-time)
|
||||
1))
|
||||
(match l
|
||||
[(missed-opt-log-entry kind msg stx located-stx pos provenance
|
||||
[(missed-opt-log-entry kind msg stx located-stx pos
|
||||
irritants merged-irritants badness)
|
||||
(missed-opt-log-entry kind msg stx located-stx pos provenance
|
||||
(missed-opt-log-entry kind msg stx located-stx pos
|
||||
irritants merged-irritants
|
||||
;; uses ceiling to never go down to 0
|
||||
;; both badness and badness-multiplier are non-0
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
,(match-lambda [(sub-report-entry s m 'typed-racket) #t]
|
||||
[_ #f]))
|
||||
("Report inlining optimizations?" .
|
||||
,(match-lambda [(sub-report-entry s m 'mzc) #t]
|
||||
,(match-lambda [(sub-report-entry s m 'inlining) #t]
|
||||
[_ #f]))
|
||||
("Report hidden costs?" .
|
||||
,(match-lambda [(sub-report-entry s m 'hidden-cost) #t]
|
||||
|
|
Loading…
Reference in New Issue
Block a user