Skip to content

Commit 5d4e688

Browse files
authored
Update BTraceTutorial.md
1 parent 7d984fc commit 5d4e688

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

docs/BTraceTutorial.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,9 @@ public class HelloWorldTrace {
374374
14. Tracing methods invoked from inside a particular method
375375

376376
__Note:__ 'class', 'method' etc. directly in the @OnMethod annotation will determine where we should look for the invocation of the methods defined by 'class', 'method' etc. parameters in the @Location annotation.
377+
377378
__Note:__ @ProbeMethodName and @ProbeClassName refer to the context method and class; @TargetMethodOrField refers to the traced method invocation
379+
378380
__Note:__ You can use the 'type' annotation parameter in @OnMethod annotation to restrict the context methods and in @Location to restrict the traced method invocations
379381

380382
``` java
@@ -422,6 +424,7 @@ public class HelloWorldTrace {
422424
16. Tracing methods invoked from inside a particular method and capturing their parameters
423425

424426
__Note:__ The captured parameters pertain to the invoked method rather than the context method
427+
425428
__Note:__ The @Self annotated parameter captures the context instance and @TargetInstance annotated parameter captures the instance the method is invoked on
426429

427430
``` java
@@ -494,6 +497,7 @@ public class HelloWorldTrace {
494497
Allows to register a handler to be invoked periodically at defined intervals.
495498

496499
__Note:__ The annotation parameter takes the interval value in milliseconds
500+
497501
__Note:__ The signature of the handler method __MUST__ be 'void ()'
498502

499503
``` java
@@ -569,8 +573,10 @@ public class HelloWorldTrace {
569573

570574
2. Let the sampler mean parameter be adjusted dynamically by keeping to the overhead target
571575

572-
__Note:__ In this case the 'mean' parameter actually specify the lowest number of nanoseconds the average interval between interception should be.
573-
__Note:__ Because the adaptive sampling needs to collect timestamps in order to maintain the overhead target the lowest value for the 'mean' parameter is 180 (cca. 60ns for gettint start/stop timestamp pair multiplied by the safety margin of 3)
576+
__Note:__ In this case the 'mean' parameter actually specify the lowest number of nanoseconds the average interval between interception should be
577+
578+
__Note:__ Because the adaptive sampling needs to collect timestamps in order to maintain the overhead target the lowest value for the 'mean' parameter is 180 (cca. 60ns for getting start/stop timestamp pair multiplied by the safety margin of 3)
579+
574580
__Note:__ The 'callD' method is very short and the number of iteration is rather limited - we will most probably get only one hit here
575581

576582
``` java

0 commit comments

Comments
 (0)