From owner-freebsd-current@FreeBSD.ORG Thu May 5 23:12:52 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 177C8106564A for ; Thu, 5 May 2011 23:12:52 +0000 (UTC) (envelope-from davidch@broadcom.com) Received: from MMS3.broadcom.com (mms3.broadcom.com [216.31.210.19]) by mx1.freebsd.org (Postfix) with ESMTP id DDFA28FC0A for ; Thu, 5 May 2011 23:12:51 +0000 (UTC) Received: from [10.9.200.131] by MMS3.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Thu, 05 May 2011 13:12:30 -0700 X-Server-Uuid: B55A25B1-5D7D-41F8-BC53-C57E7AD3C201 Received: from IRVEXCHCCR01.corp.ad.broadcom.com ([10.252.49.30]) by IRVEXCHHUB01.corp.ad.broadcom.com ([10.9.200.131]) with mapi; Thu, 5 May 2011 13:09:08 -0700 From: "David Christensen" To: "freebsd-current@freebsd.org" Date: Thu, 5 May 2011 13:08:56 -0700 Thread-Topic: Using Dtrace for Performance Evaluation Thread-Index: AcwLYENv4nl2+zvAS3+g5KnOcP0f5g== Message-ID: <5D267A3F22FD854F8F48B3D2B523819360D799A42B@IRVEXCHCCR01.corp.ad.broadcom.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: AD9e BLxS BlI2 CHQW DCMR DgT1 DlH+ FPUr FScm FlbO GOWC HI+a HL5w JLbb K8sR K9Vy; 1; ZgByAGUAZQBiAHMAZAAtAGMAdQByAHIAZQBuAHQAQABmAHIAZQBlAGIAcwBkAC4AbwByAGcA; Sosha1_v1; 7; {02A8C881-7D06-446F-A9A3-EFFD7C0B4DB5}; ZABhAHYAaQBkAGMAaABAAGIAcgBvAGEAZABjAG8AbQAuAGMAbwBtAA==; Thu, 05 May 2011 20:08:56 GMT; VQBzAGkAbgBnACAARAB0AHIAYQBjAGUAIABmAG8AcgAgAFAAZQByAGYAbwByAG0AYQBuAGMAZQAgAEUAdgBhAGwAdQBhAHQAaQBvAG4A x-cr-puzzleid: {02A8C881-7D06-446F-A9A3-EFFD7C0B4DB5} acceptlanguage: en-US MIME-Version: 1.0 X-WSS-ID: 61DDDB244NS1418982-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Using Dtrace for Performance Evaluation X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 23:12:52 -0000 I was looking at using dtrace to help characterize performance for the new bxe(4) driver but I'm having problems with the very simple task of capturing time spent in a function. The D script I'm using looks like the following: #pragma D option quiet fbt:if_bxe::entry { self->in =3D timestamp; } fbt:if_bxe::return { @callouts[((struct callout *)arg0)->c_func] =3D sum(timestamp - self->in); } tick-10sec { printa("%40a %10@d\n", @callouts); clear(@callouts); printf("\n"); } BEGIN { printf("%40s | %s\n", "function", "nanoseconds per second"); } After building dtrace into the kernel and loading the dtraceall kernel module, when I load my bxe kernel module and run "dtrace -l" to list all supported probes I notice that many functions have an=20 entry probe but no exit probe. This effectively prevents me from calculating timestamps on "fbt:if_bxe::return" probes. Why am I seeing this behavior? Dave