Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
560d7acc
Commit
560d7acc
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Initial revision
parent
1f4a317d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/dyncount.lisp
+53
-0
53 additions, 0 deletions
compiler/dyncount.lisp
with
53 additions
and
0 deletions
compiler/dyncount.lisp
0 → 100644
+
53
−
0
View file @
560d7acc
;;; -*- Package: C; Log: C.Log -*-
;;;
;;; **********************************************************************
;;; This code was written as part of the Spice Lisp project at
;;; Carnegie-Mellon University, and has been placed in the public domain.
;;; If you want to use this code or any part of Spice Lisp, please contact
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; This file contains support for collecting dynamic vop statistics.
;;;
(
in-package
"C"
)
(
export
'
(
*collect-dynamic-statistics*
))
(
export
'
(
count-me
))
(
defvar
*collect-dynamic-statistics*
nil
"When T, emit extra code to collect dynamic statistics about vop usages."
)
(
defvar
*dynamic-counts-tn*
nil
"Holds the TN for the counts vector."
)
(
defstruct
(
dyncount-info
(
:print-function
%print-dyncount-info
))
for
(
counts
(
required-argument
)
:type
(
simple-array
(
unsigned-byte
32
)
(
*
)))
(
vops
(
required-argument
)
:type
simple-vector
))
(
defprinter
dyncount-info
for
counts
vops
)
(
defun
setup-dynamic-count-info
(
component
)
(
let*
((
info
(
ir2-component-dyncount-info
(
component-info
component
)))
(
vops
(
dyncount-info-vops
info
)))
(
do-ir2-blocks
(
block
component
)
(
when
(
ir2-block-start-vop
block
)
(
let*
((
1block
(
ir2-block-block
block
))
(
index
(
1-
(
block-number
1block
)))
(
counts
(
svref
vops
index
)))
(
do
((
vop
(
ir2-block-start-vop
block
)
(
vop-next
vop
)))
((
null
vop
))
(
let*
((
vop-name
(
vop-info-name
(
vop-info
vop
)))
(
entry
(
assoc
vop-name
counts
:test
#'
eq
)))
(
if
entry
(
incf
(
cdr
entry
))
(
setf
counts
(
acons
vop-name
1
counts
)))))
(
setf
(
svref
vops
index
)
counts
))))))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment