Commit b5ecbd39 authored by Michael Hanus 's avatar Michael Hanus

vendor/profiling updated

parent 03e888a8
......@@ -10,8 +10,8 @@
"base" : ">= 1.0.0, < 2.0.0"
},
"compilerCompatibility": {
"pakcs": ">= 2.0.0",
"kics2": ">= 2.0.0"
"pakcs": ">= 2.0.0, < 3.0.0",
"kics2": ">= 2.0.0, < 3.0.0"
},
"exportedModules": [ "Debug.Profile" ],
"source": {
......
......@@ -2,19 +2,19 @@
<!DOCTYPE primitives SYSTEM "http://www.informatik.uni-kiel.de/~pakcs/primitives.dtd">
<primitives>
<primitive name="getProcessInfos" arity="0">
<library>prim_debug_profile</library>
<library>Profile_external</library>
<entry>prim_getProcessInfos</entry>
</primitive>
<primitive name="garbageCollectorOn" arity="0">
<library>prim_debug_profile</library>
<library>Profile_external</library>
<entry>prim_garbageCollectorOn</entry>
</primitive>
<primitive name="garbageCollectorOff" arity="0">
<library>prim_debug_profile</library>
<library>Profile_external</library>
<entry>prim_garbageCollectorOff</entry>
</primitive>
<primitive name="garbageCollect" arity="0">
<library>prim_debug_profile</library>
<library>Profile_external</library>
<entry>prim_garbageCollect</entry>
</primitive>
</primitives>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Definitions of builtins of module Debug.Profile:
%
% return statistics about the PAKCS process:
prim_getProcessInfos(Infos) :-
(prologbasics:getCurrentGCs(GCs)
-> I1=['Prelude.(,)'('Debug.Profile.GarbageCollections',GCs)] ; I1=[]),
(prologbasics:getCurrentChoiceSize(Choice)
-> I2=['Prelude.(,)'('Debug.Profile.Choices',Choice)|I1] ; I2=I1),
(prologbasics:getCurrentHeapSize(Heap)
-> I3=['Prelude.(,)'('Debug.Profile.Heap',Heap)|I2] ; I3=I2),
(prologbasics:getCurrentStackSize(Stack)
-> I4=['Prelude.(,)'('Debug.Profile.Stack',Stack)|I3] ; I4=I3),
(prologbasics:getCurrentCodeSize(Code)
-> I5=['Prelude.(,)'('Debug.Profile.Code',Code)|I4] ; I5=I4),
(prologbasics:getCurrentMemorySize(Mem)
-> I6=['Prelude.(,)'('Debug.Profile.Memory',Mem)|I5] ; I6=I5),
(prologbasics:getElapsedTime(ETime)
-> I7=['Prelude.(,)'('Debug.Profile.ElapsedTime',ETime)|I6] ; I7=I6),
(prologbasics:getRunTime(RTime)
-> I8=['Prelude.(,)'('Debug.Profile.RunTime',RTime)|I7] ; I8=I7),
Infos = I8.
% turn on garbage collector:
prim_garbageCollectorOn('Prelude.()') :- prologbasics:garbageCollectorOn.
% turn off garbage collector:
prim_garbageCollectorOff('Prelude.()') :- prologbasics:garbageCollectorOff.
% turn off garbage collector:
prim_garbageCollect('Prelude.()') :- prologbasics:garbageCollect.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment