Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
96e461a
collect bytes and uses from heap and print out sorted results
jackbackrack Jan 3, 2025
bade4c0
doc, improve naming, improve stat report
jackbackrack Jan 6, 2025
5a1c652
bootstrap changes to core
jackbackrack Jan 6, 2025
351c4a0
minimal profiling
jackbackrack Jan 7, 2025
8efeaf1
profile/coverage function/build interfaces in place
jackbackrack Jan 7, 2025
9556681
add profiling instructions
jackbackrack Jan 7, 2025
0e06a54
backtraces working now
jackbackrack Jan 7, 2025
7567ae8
turn on profiler in core and fix compilation issue with vm / make-entry
jackbackrack Jan 8, 2025
33085a6
get profiling working at least for optimized mode only
jackbackrack Jan 8, 2025
88b579c
split out profiler, add serializer, and refactor collapse stack
jackbackrack Jan 9, 2025
67670fa
move length to front of heapstatistics and split out dumping from col…
jackbackrack Jan 9, 2025
aad6396
add profiling support in compiler
jackbackrack Jan 17, 2025
9415cd6
add HEAP-ANALYZER flag so we can write code ahead of PR review
jackbackrack Jan 17, 2025
062be1e
dont profile check in lostanza functions
jackbackrack Jan 21, 2025
b0aa576
add sample size in msec to profiler
jackbackrack Jan 22, 2025
7fd1535
improve profiler interface
jackbackrack Jan 24, 2025
b259c1c
get initial version of retained heap analysis going
jackbackrack Jan 28, 2025
6bee7f8
remove unique-ids and clean up print outs
jackbackrack Jan 28, 2025
f3e6f82
clean up more
jackbackrack Jan 28, 2025
eadcf8b
more comments and cleanups
jackbackrack Jan 28, 2025
e267344
remove top-level call to run it
jackbackrack Jan 28, 2025
e72f91f
prepare for PR
jackbackrack Jan 28, 2025
ca854d2
change arms of if bootstrap
jackbackrack Jan 28, 2025
b71b42c
merge in heap-analysis and retained-heap-analysis branches
jackbackrack Jan 28, 2025
7fd0a73
get both heap analyses running merged together and cleaned up
jackbackrack Jan 28, 2025
61c650c
merge in profiler
jackbackrack Jan 28, 2025
9ea5e6c
fix bug in call to profiler
jackbackrack Jan 28, 2025
e7efa60
fix typo
jackbackrack Jan 28, 2025
207e2d4
rename profiler package, add core/profiler to build list
jackbackrack Jan 28, 2025
33f4b8e
rename packages
jackbackrack Jan 29, 2025
6aeabd7
rename heap-analysis to heap-analyzer
jackbackrack Jan 29, 2025
ebcaca3
get package naming right in files and stanza.proj etc
jackbackrack Jan 29, 2025
c308e2b
bump stanzapm to 0.19.0
jwatson0 Feb 6, 2025
ae78ab0
ci: point to stanzapm pipelines
jwatson0 Feb 6, 2025
7f2a205
ci: point to stanzapm pipelines (2)
jwatson0 Feb 6, 2025
9c1cbe8
ci: point to stanzapm pipelines (3)
jwatson0 Feb 7, 2025
7d20cb4
Merge pull request #1 from JITx-Inc/jw/stanzapm0190
jwatson0 Feb 7, 2025
b17face
ci: build using stanzapm release
jwatson0 Feb 7, 2025
09bbc2a
Bump version to 0.19.1
jwatson0 Feb 7, 2025
5348b95
fix conflict
jackbackrack Feb 7, 2025
0094761
Merge pull request #3 from JITx-Inc/develop
jackbackrack Feb 7, 2025
5dbd8f4
Bump version to 0.19.2
jwatson0 Feb 7, 2025
e693e21
fix args for windows on start_sample_profiling
jackbackrack Feb 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/concourse-notify-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ on: [ pull_request, workflow_dispatch ]
env:
HOST: https://ci.jitx.com
TEAM: main
PIPELINE: lbstanza
PIPELINE: stanzapm
INSTVARS: vars.branch="${{ github.base_ref }}"
TOKEN: ${{ secrets.CONCOURSE_WEBHOOK_TOKEN }}
jobs:
trigger-pr:
runs-on: ubuntu-latest
env:
RESOURCE: github--lbstanza--pr
RESOURCE: github--stanzapm--pr
steps:
- name: Trigger Concourse Pull Request
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/concourse-notify-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ on: [ push, workflow_dispatch ]
env:
HOST: https://ci.jitx.com
TEAM: main
PIPELINE: lbstanza
PIPELINE: stanzapm
INSTVARS: vars.branch="${{ github.ref_name }}"
TOKEN: ${{ secrets.CONCOURSE_WEBHOOK_TOKEN }}
jobs:
trigger-push:
runs-on: ubuntu-latest
env:
RESOURCE: git--lbstanza
RESOURCE: git--stanzapm
steps:
- name: Trigger Concourse resource check
run: |
Expand Down
3 changes: 2 additions & 1 deletion ci/build-stanza-version.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
# like 1.23.45
#
# Use version 0.17.56 to compile 0.18.0
0.18.96
0.19.0

4 changes: 2 additions & 2 deletions ci/build-stanza.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ USAGE="STANZA_CONFIG=/path $0"
echo " STANZA_CONFIG:" "${STANZA_CONFIG:?Usage: ${USAGE}}" # directory where .stanza config file will be stored, as in normal stanza behavior

# Defaulted env var inputs - can override if necessary
echo " REPODIR:" "${REPODIR:=lbstanza}"
echo " REPODIR:" "${REPODIR:=stanzapm}"
echo " CONAN_USER_HOME:" "${CONAN_USER_HOME:=${REPODIR}}"
echo " CREATE_ARCHIVE:" "${CREATE_ARCHIVE:=false}"
echo " CREATE_PACKAGE:" "${CREATE_PACKAGE:=false}"
Expand Down Expand Up @@ -79,7 +79,7 @@ esac


cd "${REPODIR}"
echo "Building lbstanza version ${VER} in ${PWD}"
echo "Building stanzapm version ${VER} in ${PWD}"

mkdir -p build
mkdir -p bin
Expand Down
2 changes: 1 addition & 1 deletion ci/calc-stanza-version-bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TOP="${PWD}"
>&2 echo " BRANCH:" "${BRANCH:?Usage: BRANCH=foo $0}"

# Defaulted env var inputs - can override if necessary
>&2 echo " REPODIR:" "${REPODIR:=lbstanza}"
>&2 echo " REPODIR:" "${REPODIR:=stanzapm}"
## By default, get the most recent previous tag on this branch from git
### note: if multiple tags exist on one commit, git doesn't always desecribe the most recent one
### ### maybe use: git tag --sort=committerdate --contains HEAD~ | tail -1
Expand Down
6 changes: 3 additions & 3 deletions ci/install-stanza.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ TOP="${PWD}"
# the machine that you are building for (host)
# and the machine that GCC will produce code for (target).

USAGE="STANZA_BUILD_PLATFORM={linux|macos|windows} STANZA_BUILD_VER=0.17.56 STANZA_CONFIG=/path STANZA_INSTALL_DIR=/path $0"
STANZA_DOWNLOAD_BASEURL="https://github.com/StanzaOrg/lbstanza/releases/download"
USAGE="STANZA_BUILD_PLATFORM={linux|macos|windows} STANZA_BUILD_VER=0.19.0 STANZA_CONFIG=/path STANZA_INSTALL_DIR=/path $0"
STANZA_DOWNLOAD_BASEURL="https://github.com/jitx-inc/stanzapm/releases/download"


# Required env var inputs
Expand All @@ -27,7 +27,7 @@ BSVTXT="${THISDIR}/build-stanza-version.txt"
# extract the version from first non-comment line of the file
BSTZVER=$(grep -v ^\# "${BSVTXT}" | head -1 | awk '{ print $1}')
echo "Using existing stanza version $BSTZVER"
echo " STANZA_BUILD_VER:" "${STANZA_BUILD_VER:=${BSTZVER}}" # 0.17.56
echo " STANZA_BUILD_VER:" "${STANZA_BUILD_VER:=${BSTZVER}}" # 0.19.0
echo "STANZA_BUILD_PLATFORM:" "${STANZA_BUILD_PLATFORM:=$(uname -s)}" # linux|macos|Darwin|windows|MINGW64

# var input validation
Expand Down
20 changes: 20 additions & 0 deletions compiler/codegen.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public defstruct AsmStubs :
stack-limit:Int
registers:Int
system-registers-space:Int
profile-flag:Int
profile-buffer:Int
function-counters:Int
function-info:Int
heap-start:Int
heap-top:Int
heap-limit:Int
Expand All @@ -72,6 +76,7 @@ public defstruct AsmStubs :
collect-garbage:Int
saved-regs:Tuple<Int>
saved-fregs:Tuple<Int>
heap-statistics:Int
class-table:Int
global-root-table:Int
stackmap-table:Int
Expand Down Expand Up @@ -105,6 +110,10 @@ public defn AsmStubs (backend:Backend) :
next(id-counter) ;stack-limit:Int
next(id-counter) ;registers:Int
next(id-counter) ;system-registers-space:Int
next(id-counter) ;profile-flag:Int
next(id-counter) ;profile-buffer:Int
next(id-counter) ;function-counters:Int
next(id-counter) ;function-info:Int
next(id-counter) ;heap-start:Int
next(id-counter) ;heap-top:Int
next(id-counter) ;heap-limit:Int
Expand All @@ -128,6 +137,7 @@ public defn AsmStubs (backend:Backend) :
next(id-counter) ;collect-garbage:Int
saved-regs ;saved-regs:Tuple<Int>
saved-fregs ;saved-fregs:Tuple<Int>
next(id-counter) ;heap-statistics:Int
next(id-counter) ;class-table:Int
next(id-counter) ;global-root-table:Int
next(id-counter) ;stackmap-table:Int
Expand Down Expand Up @@ -204,6 +214,10 @@ public defn compile-runtime-stubs (emitter:CodeEmitter, stubs:AsmStubs) :
comment("stack-limit = %_" % [stack-limit(stubs)])
comment("registers = %_" % [registers(stubs)])
comment("system-registers-space = %_" % [system-registers-space(stubs)])
comment("profile-flag = %_" % [profile-flag(stubs)])
comment("profile-buffer = %_" % [profile-buffer(stubs)])
comment("function-counters = %_" % [function-counters(stubs)])
comment("function-info = %_" % [function-info(stubs)])
comment("heap-start = %_" % [heap-start(stubs)])
comment("heap-top = %_" % [heap-top(stubs)])
comment("heap-limit = %_" % [heap-limit(stubs)])
Expand Down Expand Up @@ -334,6 +348,12 @@ public defn compile-entry-function (emitter:CodeEmitter, stubs:AsmStubs) :
#label(safepoint-table) ;safepoint-table:ptr<?>
#label(debug-table) ;debug-table:ptr<?>
#label(local-var-table) ;local-var-table:ptr<?>
#label(heap-statistics) ;heap-statistics:ptr<?>
#long() ;heap-dominator-tree:ptr<?>
#label(profile-flag) ;profile-flag: ptr<long>
#long() ;profile-buffer: ptr<long>
#label(function-counters) ;function-counters: ptr<long>
#label(function-info) ;function-info: ptr<FunctionInfoTable>
#label(class-table) ;class-table:ptr<?>
#label(global-root-table) ;global-root-table:ptr<GlobalRoots>
#label(stackmap-table) ;stackmap-table:ptr<?>
Expand Down
2 changes: 2 additions & 0 deletions compiler/compiler-build-settings.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public defstruct BuildSettings :
build-from-source?: True|False
optimize?: True|False
debug?: True|False
profile?: True|False
coverage?: True|False
ccfiles: Tuple<String>
ccflags: Tuple<String|Tuple<String>>
flags: Tuple<Symbol>
Expand Down
9 changes: 6 additions & 3 deletions compiler/compiler-main.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ public defn compile (proj-manager:ProjManager,
backend:Backend,
optimize?:True|False,
debug?:True|False,
profile?:True|False,
coverage?:True|False,
macro-plugins:Tuple<String>,
force-build-macros?:True|False) -> CompilationResult :
defn driver () :
Expand Down Expand Up @@ -224,7 +226,7 @@ public defn compile (proj-manager:ProjManager,
`unoptimized-asm :
val packages = for p in /packages(result) map :
match(p) :
(p:EPackage) : compile(lower-unoptimized(p), debug?)
(p:EPackage) : compile(lower-unoptimized(p, profile?, coverage?), debug?)
(p:StdPkg) : p
compile-vmpackages(pkgsaver when write-out-pkgs?,
packages,
Expand All @@ -244,7 +246,7 @@ public defn compile (proj-manager:ProjManager,
val epackages = for p in packages map :
match(p:FastPkg) : EPackage(packageio(p), exps(p))
else : p as EPackage
compile(lower-optimized(epackages), debug?)
compile(lower-optimized(epackages, profile?, coverage?), debug?)

;- pkgsaver: False if we not need to write out any .pkg files to disk (either
; to pkg dir or to pkg cache.).
Expand Down Expand Up @@ -309,7 +311,7 @@ public defn compile (proj-manager:ProjManager,
for package in packages do :
match(package) :
(epackage:EPackage) :
val vmpackage = compile(lower-unoptimized(epackage), debug?)
val vmpackage = compile(lower-unoptimized(epackage, profile?, coverage?), debug?)
val npkg = normalize(vmpackage, backend)
val buffer = Vector<Ins>()
emit-normalized-package(npkg, buffer-emitter(buffer, stubs), stubs)
Expand Down Expand Up @@ -399,3 +401,4 @@ defn collapse (p:NormVMPackage|StdPkg) :
defmethod debug-table (this) : debug-table(vmp)
defmethod safepoint-table (this) : safepoint-table(vmp)
defmethod debug-name-table (this): debug-name-table(vmp)
defmethod function-info (this) : function-info(vmp)
9 changes: 8 additions & 1 deletion compiler/compiler.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ defn compute-build-settings (projenv:StandardProjEnv,
val build-optimization = optimize?(settings) or optimize(s)
;Compute build optimization level
val build-debug = debug?(settings)
;Compute build profile level
val build-profile = profile?(settings) or profile(s)
val build-coverage = coverage?(settings) or coverage(s)
;Compute assembly
val build-asm = string-or?(original-asm(settings), value?(assembly(s)))
;Compute output
Expand Down Expand Up @@ -110,6 +113,8 @@ defn compute-build-settings (projenv:StandardProjEnv,
build-from-source?(settings)
build-optimization,
build-debug,
build-profile,
build-coverage,
build-ccfiles,
build-ccflags,
to-tuple(build-flags),
Expand Down Expand Up @@ -243,10 +248,12 @@ public defn compile (settings:BuildSettings, system:System) :
println("Build target %~ is already up-to-date." % [build-target?(settings*)])
else :
setup-system-flags(settings*)
add-flag(`HEAP-ANALYZER)
val proj-params = ProjParams(compiler-flags(), optimize?(settings*), debug?(settings*), false, build-from-source?(settings), pkg-cache-dir(settings*))
val proj-manager = ProjManager(proj, proj-params, auxfile)
val comp-result = compile(proj-manager, auxfile, build-inputs!(settings*), vm-packages(settings*), asm?(settings*), pkg-dir(settings*),
backend(platform(settings*) as Symbol), optimize?(settings*), debug?(settings*),
backend(platform(settings*) as Symbol), optimize?(settings*), debug?(settings*),
profile?(settings*), coverage?(settings*),
macro-plugins(settings*), inputs(settings) is BuildTarget)
save(auxfile)
within delete-temporary-file-on-finish(settings*) :
Expand Down
2 changes: 2 additions & 0 deletions compiler/defs-db.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ protected-when(TESTING) defn analyze-input (input:DefsDbInput) -> DependencyResu
true, ;build-from-source?
optimize?(input), ;optimize?
false, ;debug?
false, ;profile?
false, ;coverage?
[], ;ccfiles
[], ;ccflags
flags(input) ;flags
Expand Down
1 change: 1 addition & 0 deletions compiler/dl-ir.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,7 @@ public val CORE-COLLECT-STACK-TRACE-ID = register $ core-fnid(`collect-stack-tra
public val CORE-COLLECT-GARBAGE-ID = register $ core-fnid(`collect-garbage, [`long])
public val CORE-MAKE-STRING-ID = register $ core-fnid(`String, [DPtrT(DByte())])
public val CORE-EXECUTE-TOPLEVEL-COMMAND-ID = register $ core-fnid(`execute-toplevel-command, [DArrow([], core-type(`False))])
public val CORE-PROFILE-STACK-TRACE-ID = register $ core-fnid(`profile-stack-trace)

;============================================================
;====================== ID Environment ======================
Expand Down
4 changes: 2 additions & 2 deletions compiler/el-infer.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ defn analyze-single-block (emit:Ins -> ?,
(ins:ETupleSet|EStruct|EPtr|ELabel|ETCall|
EDump|EConv|EGoto|ECheckLength|ECheckSet|
EBoxSet|EReturn|EObjectTGet|EClosureTGet|
ETDef|ETypeObject|EEnd|ELive|ECheckFail|ESafepoint) : gen-trivial-commands(ins)
ETDef|ETypeObject|EEnd|ELive|ECheckFail|ESafepoint|EProfile) : gen-trivial-commands(ins)

;Utility: For any uses of inferred variables generate
;them here.
Expand Down Expand Up @@ -551,7 +551,7 @@ defn analyze-single-block (emit:Ins -> ?,
defn gen-trivial-commands (ins:ETupleSet|EStruct|EPtr|ELabel|ETCall|
EDump|EConv|EGoto|ECheckLength|ECheckSet|
EBoxSet|EReturn|EObjectTGet|EClosureTGet|
ETDef|ETypeObject|EEnd|ELive|ECheckFail|ESafepoint) :
ETDef|ETypeObject|EEnd|ELive|ECheckFail|ESafepoint|EProfile) :
gen-uses(ins)
emit(Wrapped<EIns>(ins))
for x in varlocs(ins) do :
Expand Down
14 changes: 13 additions & 1 deletion compiler/el-ir.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public defstruct EBot <: HiEType
public defstruct EPackage :
packageio: PackageIO with: (updater => sub-packageio)
exps: Tuple<ETExp> with: (updater => sub-exps)
function-info: False|Tuple<FunctionInfo> with: (default => false, updater => sub-function-info)

public defn name (e:EPackage) :
package(packageio(e))
Expand Down Expand Up @@ -544,6 +545,10 @@ public defstruct DetupleContext <: CastErrorContext
public defstruct GetVarContext <: CastErrorContext
public defstruct BranchContext <: CastErrorContext

public defstruct EProfile <: EIns :
id: Int
kind: Int

;============================================================
;======================= Primitives =========================
;============================================================
Expand Down Expand Up @@ -761,6 +766,7 @@ defmethod print (o:OutputStream, e:EIns) :
(e:ETypeof) : P $ "goto L%_ when typeof(%_, %_) else L%_" % [n1(e), y(e), type(e), n2(e)]
(e:ECheckFail) : P $ "check-fail(%_) %_ : %_" % [ctxt(e), y(e), type(e)]
(e:ESafepoint) : P $ "safepoint %_ ;%_" % [group-id(e), info?(e)]
(e:EProfile) : P $ "profile(%_,%_)" % [id(e), kind(e)]

defmethod print (o:OutputStream, t:CallType) :
print{o, _} $ match(t) :
Expand Down Expand Up @@ -1001,6 +1007,7 @@ defsyntax el-ir :
defrule eins = (?x:#vloc : ?xt:#etype = load ?loc:#eloc) : ELoad(x, xt, loc)
defrule eins = (?x:#vloc = call ?t:#calltype ?f:#eimm(?ys:#eimm ...)) : ECall(x, f, to-tuple(ys), t, add-base-dir(closest-info()))
defrule eins = (?x:#vloc = ?y:#eimm) : EDef(x, y)
defrule eins = (profile(?id:#int, ?arg:#int)) : EProfile(id, arg)

defproduction calltype : CallType
defrule calltype = (guarded((?a1:#etype ...) -> ?a2:#etype)) : CallGuarded(to-tuple(a1), a2)
Expand Down Expand Up @@ -1305,7 +1312,7 @@ defmethod map<?T> (f:ELItem -> ELItem, item:ELItem&?T) -> ELItem&T :
(t:EBot) : t

;EPackage
(e:EPackage) : EPackage(packageio(e), h(exps(e)))
(e:EPackage) : EPackage(packageio(e), h(exps(e)), function-info(e))

;ETExps
(e:EDefGlobal) : EDefGlobal(n(e), h(type(e)), mutable?(e), lostanza?(e))
Expand Down Expand Up @@ -1420,6 +1427,9 @@ defmethod map<?T> (f:ELItem -> ELItem, item:ELItem&?T) -> ELItem&T :
;Closures
(e:EClosure) : EClosure(n(e), h(targs(e)), h(ys(e)))

;Profile
(e:EProfile) : EProfile(id(e), kind(e))

;============================================================
;===================== Definitions ==========================
;============================================================
Expand Down Expand Up @@ -1478,6 +1488,7 @@ public defn varlocs (e:EIns) -> Tuple<EVarLoc> :
(e:ETypeof) : []
(e:ECheckFail) : []
(e:ESafepoint) : []
(e:EProfile) : []

;Return the list of immediates that the instruction
;uses to perform its action.
Expand Down Expand Up @@ -1532,6 +1543,7 @@ public defn uses (e:EIns) -> Seqable<EImm> :
(e:ETypeof) : [y(e)]
(e:ECheckFail) : [y(e)]
(e:ESafepoint) : []
(e:EProfile) : []

;Return the list of immediates that the instruction
;uses to retrieve its location.
Expand Down
9 changes: 6 additions & 3 deletions compiler/el-to-vm.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public defn compile (epackage:EPackage, debug?:True|False) -> VMPackage :
val init = compile-init(init-compiler, iotable, progbuffer)
init

val vmp = to-vmpackage(progbuffer, io, init)
val vmp = to-vmpackage(progbuffer, io, init, function-info(epackage))
;dump(vmp, "logs", "pre-analyze")
val vmp* = within time-ms!("VM Analyze") : analyze(vmp)
;dump(vmp*, "logs", false)
Expand Down Expand Up @@ -565,7 +565,7 @@ defmulti add (b:ProgBuffer, e:VMMethod) -> False
defmulti add (b:ProgBuffer, e:VMDebugInfo) -> False
defmulti add (b:ProgBuffer, e:SafepointEntry) -> SafepointIns
defmulti add (b:ProgBuffer, e:VMDebugName) -> False
defmulti to-vmpackage (b:ProgBuffer, io:PackageIO, init:Int|False) -> VMPackage
defmulti to-vmpackage (b:ProgBuffer, io:PackageIO, init:Int|False, function-info:False|Tuple<FunctionInfo>) -> VMPackage

defn ProgBuffer () :
val globals = Vector<VMGlobal>()
Expand All @@ -591,7 +591,7 @@ defn ProgBuffer () :
defmethod add (this, e:VMDebugInfo) : add(debug, e)
defmethod add (this, e:SafepointEntry) : add(sptable, e)
defmethod add (this, e:VMDebugName) : add(debugnames, e)
defmethod to-vmpackage (this, io:PackageIO, init:Int|False) :
defmethod to-vmpackage (this, io:PackageIO, init:Int|False, function-info:False|Tuple<FunctionInfo>) :
VMPackage(io, init,
to-tuple(globals),
to-tuple(datas),
Expand All @@ -603,6 +603,7 @@ defn ProgBuffer () :
to-tuple(extern-defns),
VMDebugNameTable(to-tuple(debugnames)),
VMDebugInfoTable(to-tuple(debug)),
function-info
compile(sptable))

;============================================================
Expand Down Expand Up @@ -1544,6 +1545,8 @@ defn Compiler (gt:GlobalTable,
(info:StackTraceInfo) :
make-safepoint(info) when /info(info) is-not False
(f:False) : false
(ins:EProfile) :
emit(ProfileIns(id(ins), kind(ins)))

;---------------------------------------------------------
;--------------- Create the Compiler Type ----------------
Expand Down
Loading
Loading