;;-*-Lisp-*- (in-package goal) ;; definition of type tr-stat (deftype tr-stat (structure) ((groups uint16) (fragments uint16) (tris uint32) (dverts uint32) (instances uint16) (pad uint16) ) ) ;; definition for method 3 of type tr-stat (defmethod inspect ((this tr-stat)) (format #t "[~8x] ~A~%" this 'tr-stat) (format #t "~Tgroups: ~D~%" (-> this groups)) (format #t "~Tfragments: ~D~%" (-> this fragments)) (format #t "~Ttris: ~D~%" (-> this tris)) (format #t "~Tdverts: ~D~%" (-> this dverts)) (format #t "~Tinstances: ~D~%" (-> this instances)) (format #t "~Tpad: ~D~%" (-> this pad)) this ) ;; definition of type merc-global-stats (deftype merc-global-stats (structure) ((merc tr-stat :inline) (mercneric tr-stat :inline) ) ) ;; definition for method 3 of type merc-global-stats (defmethod inspect ((this merc-global-stats)) (format #t "[~8x] ~A~%" this 'merc-global-stats) (format #t "~Tmerc: #~%" (-> this merc)) (format #t "~Tmercneric: #~%" (-> this mercneric)) this ) ;; definition of type perf-stat (deftype perf-stat (structure) ((frame-number uint32) (count uint32) (cycles uint32) (instructions uint32) (icache uint32) (dcache uint32) (select uint32) (ctrl uint32) (accum0 uint32) (accum1 uint32) (to-vu0-waits uint32) (to-spr-waits uint32) (from-spr-waits uint32) ) :pack-me (:methods (perf-stat-method-9 (_type_) none) (print-to-stream (_type_ string basic) none) (reset! (_type_) none) (read! (_type_) none) (update-wait-stats (_type_ uint uint uint) none) ) ) ;; definition for method 3 of type perf-stat (defmethod inspect ((this perf-stat)) (format #t "[~8x] ~A~%" this 'perf-stat) (format #t "~Tframe-number: ~D~%" (-> this frame-number)) (format #t "~Tcount: ~D~%" (-> this count)) (format #t "~Tcycles: ~D~%" (-> this cycles)) (format #t "~Tinstructions: ~D~%" (-> this instructions)) (format #t "~Ticache: ~D~%" (-> this icache)) (format #t "~Tdcache: ~D~%" (-> this dcache)) (format #t "~Tselect: ~D~%" (-> this select)) (format #t "~Tctrl: ~D~%" (-> this ctrl)) (format #t "~Taccum0: ~D~%" (-> this accum0)) (format #t "~Taccum1: ~D~%" (-> this accum1)) (format #t "~Tto-vu0-waits: ~D~%" (-> this to-vu0-waits)) (format #t "~Tto-spr-waits: ~D~%" (-> this to-spr-waits)) (format #t "~Tfrom-spr-waits: ~D~%" (-> this from-spr-waits)) this ) ;; definition of type perf-stat-array (deftype perf-stat-array (inline-array-class) ((data perf-stat :inline :dynamic) ) ) ;; definition for method 3 of type perf-stat-array (defmethod inspect ((this perf-stat-array)) (format #t "[~8x] ~A~%" this (-> this type)) (format #t "~Tlength: ~D~%" (-> this length)) (format #t "~Tallocated-length: ~D~%" (-> this allocated-length)) (format #t "~Tdata[0] @ #x~X~%" (-> this data)) this ) ;; failed to figure out what this is: (set! (-> perf-stat-array heap-base) (the-as uint 52)) ;; definition for method 11 of type perf-stat ;; INFO: Return type mismatch int vs none. (defmethod reset! ((this perf-stat)) (let ((v1-0 (-> this ctrl))) (+! (-> this count) 1) (b! (zero? v1-0) cfg-2 :delay (nop!)) (.mtc0 Perf 0) (.sync.l) (.sync.p) (.mtpc pcr0 0) (.mtpc pcr1 0) (.sync.l) (.sync.p) (.mtc0 Perf v1-0) ) (.sync.l) (.sync.p) (label cfg-2) 0 (none) ) ;; definition for method 12 of type perf-stat ;; INFO: Return type mismatch int vs none. (defmethod read! ((this perf-stat)) (local-vars (v1-1 int) (v1-3 int)) (b! (zero? (-> this ctrl)) cfg-2 :delay (nop!)) (.mtc0 Perf 0) (.sync.l) (.sync.p) (.mfpc v1-1 pcr0) (+! (-> this accum0) v1-1) (.mfpc v1-3 pcr1) (+! (-> this accum1) v1-3) (label cfg-2) 0 (none) ) ;; definition for method 13 of type perf-stat ;; INFO: Return type mismatch int vs none. (defmethod update-wait-stats ((this perf-stat) (arg0 uint) (arg1 uint) (arg2 uint)) (when (nonzero? (-> this ctrl)) (+! (-> this to-vu0-waits) arg0) (+! (-> this to-spr-waits) arg1) (+! (-> this from-spr-waits) arg2) ) 0 (none) ) ;; failed to figure out what this is: (when (not *debug-segment*) (set! (-> perf-stat method-table 11) nothing) (set! (-> perf-stat method-table 12) nothing) (set! (-> perf-stat method-table 13) nothing) )