/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ BEGIN { printf("cpid=%d\n", cpid); } usdt:{{bin}}:netbench__send /pid==cpid/ { @s[arg0,arg1]=stats(arg2); } usdt:{{bin}}:netbench__receive /pid==cpid/ { @r[arg0,arg1]=stats(arg2); } usdt:{{bin}}:netbench__alloc /pid==cpid/ { @a=stats(arg0); } usdt:{{bin}}:netbench__realloc /pid==cpid/ { @R=stats(arg1); } usdt:{{bin}}:netbench__dealloc /pid==cpid/ { @d=stats(arg0); } usdt:{{bin}}:netbench__connect /pid==cpid/ { @O=count(); @h=stats(arg2); } usdt:{{bin}}:netbench__accept /pid==cpid/ { @A=count(); } usdt:{{bin}}:netbench__profile /pid==cpid/ { @p[arg1]=stats(arg2); @P[arg1]=hist(arg2); } uprobe:{{libc}}:malloc /pid==cpid/ { @a=stats(arg0); } uprobe:{{libc}}:realloc /pid==cpid/ { @R=stats(arg1); } {{#if hardware}} hardware:cycles /pid==cpid/ { @c=count(); } hardware:instructions /pid==cpid/ { @i=count(); } hardware:branches /pid==cpid/ { @b=count(); } {{/if}} software:cs /pid==cpid/ { @C=count(); } tracepoint:raw_syscalls:sys_enter /pid==cpid/ { @S=count(); } i:ms:{{interval_ms}} { @=count(); print(@); {{#if hardware}} print(@c); print(@i); print(@b); {{/if}} print(@C); print(@S); print(@a); clear(@a); print(@R); clear(@R); print(@d); clear(@d); print(@s); clear(@s); print(@r); clear(@r); print(@O); clear(@O); print(@A); clear(@A); print(@p); clear(@p); print(@P); clear(@P); print(@h); clear(@h); print("==="); }