diff --git a/basis/tools/profiler/sampling/sampling-tests.factor b/basis/tools/profiler/sampling/sampling-tests.factor index 06c1ff9f18..ac5cd5fd6f 100644 --- a/basis/tools/profiler/sampling/sampling-tests.factor +++ b/basis/tools/profiler/sampling/sampling-tests.factor @@ -1,5 +1,5 @@ -USING: assocs byte-arrays calendar kernel math memory namespaces -parser random sequences threads tools.profiler.sampling +USING: assocs byte-arrays calendar kernel kernel.private math memory +namespaces parser random sequences threads tools.profiler.sampling tools.profiler.sampling.private tools.test ; IN: tools.profiler.sampling.tests @@ -27,6 +27,10 @@ gc ! Seed the samples data [ "resource:basis/tools/memory/memory.factor" run-file ] profile (get-samples) length 0 > + OBJ-SAMPLE-CALLSTACKS special-object first 0 > +] unit-test + +{ t } [ ! On x86.64, [ ] profile doesn't generate any samples at all ! because it runs so quickly. On x86.32, one spurious sample is ! sometimes generated for some unknown reason. diff --git a/core/kernel/kernel-docs.factor b/core/kernel/kernel-docs.factor index a8dfa08e50..f3c57776af 100644 --- a/core/kernel/kernel-docs.factor +++ b/core/kernel/kernel-docs.factor @@ -1,16 +1,24 @@ -USING: alien arrays classes combinators help.markup help.syntax -kernel.private layouts math quotations system threads words ; +USING: alien arrays classes combinators heaps help.markup help.syntax +kernel.private layouts math quotations sequences system threads words +; IN: kernel +HELP: OBJ-CURRENT-THREAD +{ $description "Contains a reference to the running " { $link thread } " instance." } ; + HELP: JIT-PUSH-LITERAL { $description "JIT code template for pushing literals unto the datastack." } ; +HELP: OBJ-SAMPLE-CALLSTACKS +{ $description "A " { $link sequence } " that contains all call frames that is being captured during sampling profiling. See the " { $vocab-link "tools.profiler.sampling" } " vocab." } ; + +HELP: OBJ-SLEEP-QUEUE +{ $description "A " { $link min-heap } " containing sleeping threads." } +{ $see-also sleep-queue } ; + HELP: OBJ-UNDEFINED { $description "Default definition for undefined words" } ; -HELP: OBJ-CURRENT-THREAD -{ $description "Contains a reference to the running " { $link thread } " instance." } ; - HELP: WIN-EXCEPTION-HANDLER { $description "This special object is an " { $link alien } " containing a pointer to the processes global exception handler. Only applicable on " { $link windows } "." } ; diff --git a/core/kernel/kernel.factor b/core/kernel/kernel.factor index 4471432dfc..8e3158bde8 100644 --- a/core/kernel/kernel.factor +++ b/core/kernel/kernel.factor @@ -365,6 +365,8 @@ CONSTANT: SIGNAL-HANDLER-WORD 48 CONSTANT: LEAF-SIGNAL-HANDLER-WORD 49 CONSTANT: WIN-EXCEPTION-HANDLER 50 +CONSTANT: OBJ-SAMPLE-CALLSTACKS 51 + CONSTANT: REDEFINITION-COUNTER 52 CONSTANT: CALLBACK-STUB 53