"Fossies" - the Fresh Open Source Software Archive

Member "ponyc-0.33.0/examples/dtrace/mbox-size.d" (1 Nov 2019, 661 Bytes) of package /linux/misc/ponyc-0.33.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) D source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/env dtrace -s
    2 
    3 #pragma D option quiet
    4 
    5 /*
    6  * This script only tracks user actor -> user actor messages.
    7  * Messages such as ACTORMSG_ACK and ACTORMSG_CONF (see telemetry.d)
    8  * aren't caused directly by Pony code that is visible to the
    9  * programmer.  Invisible system messages are detected with the
   10  * 0xffffff00 mask.
   11  */
   12 
   13 pony$target:::actor-msg-send
   14 /(arg1 & 0xffffff00)!= 0xffffff00/
   15 {
   16   @in[arg3] = count();
   17 }
   18 
   19 pony$target:::actor-msg-run
   20 {
   21   @out[arg1] = count();
   22 }
   23 
   24 tick-1sec
   25 {
   26   printf("Into mbox (actor-msg-send):\n");
   27   printa(@in);
   28   clear(@in);
   29   printf("Out of mbox (actor-msg-run):\n");
   30   printa(@out);
   31   clear(@out);
   32   printf("\n");
   33 }