kernel.private: adding OBJ-SAMPLE-CALLSTACKS + test case

char-rename
Björn Lindqvist 2016-11-24 05:11:46 +01:00
parent 209feb4cbb
commit 3b0d5bba15
3 changed files with 21 additions and 7 deletions

View File

@ -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.

View File

@ -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 } "." } ;

View File

@ -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