From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA800C433F8 for ; Wed, 15 Jul 2020 18:45:27 +0000 (UTC) Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EC122065F for ; Wed, 15 Jul 2020 18:45:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.lttng.org header.i=@lists.lttng.org header.b="xQVROtNB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EC122065F Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=lists.lttng.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lttng-dev-bounces@lists.lttng.org Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4B6RCT4r4tz1XlQ; Wed, 15 Jul 2020 14:45:25 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1594838726; bh=vX/xgYZtJPgSlPlMFyZg3TEa5+EF/FswZBZNdehELmU=; h=Date:To:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=xQVROtNBSbSnYzqP4EHfl+V3+LYlSG6q9AdGxPbP20Ekjhr6juivI+cmfE1ZKFluR dXYmTD/ie8+5DlBojCEu1X0a7rq1D/hWvNs1aRG2i1GFuNnj9YRmivE2UH5M2ZCJbN W8z5D6tjk/wdlt6o9PywXko0LAjeh2Ups/gwT+1USWRI7DYQFN/jzvNDh1XyYLbXp6 rqi/z1vIk+3mS/M8CTojxcWzxFp003uQ5JMB94calsI9mtYuohyXyL1g3NrokFTD2+ iqVBrt8FOObi474kJ1EaulYe5d8lzPR4xu5ulKDsqflFA99VIkvszieyI8Lsr3RHdk GFCcSjwnEaeDw== Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by lists.lttng.org (Postfix) with ESMTPS id 4B6RCS3bQBz1Xnv for ; Wed, 15 Jul 2020 14:45:24 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id CD488284F64; Wed, 15 Jul 2020 14:45:18 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id h2A1JpkzLQ5Y; Wed, 15 Jul 2020 14:45:18 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 6FF91284EF8; Wed, 15 Jul 2020 14:45:18 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 6FF91284EF8 X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pbobVPXfhyn3; Wed, 15 Jul 2020 14:45:18 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id 62C1C284EF4; Wed, 15 Jul 2020 14:45:18 -0400 (EDT) Date: Wed, 15 Jul 2020 14:45:18 -0400 (EDT) To: ahmadkhorrami Message-ID: <83963025.14828.1594838718290.JavaMail.zimbra@efficios.com> In-Reply-To: <20200715142849.0bfe909a@oasis.local.home> References: <20200715142849.0bfe909a@oasis.local.home> MIME-Version: 1.0 X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_3955 (ZimbraWebClient - FF78 (Linux)/8.8.15_GA_3953) Thread-Topic: Capturing User-Level Function Calls/Returns Thread-Index: vVoqBn6OBnqEvOCKwZKhA82Jg+NW2g== Subject: Re: [lttng-dev] Capturing User-Level Function Calls/Returns X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.31 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mathieu Desnoyers via lttng-dev Reply-To: Mathieu Desnoyers Cc: linux-trace-users , lttng-dev , rostedt , Namhyung Kim Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" Message-ID: <20200715184518.qa_q_rasB2taHCNvQ2bGRAlLaAJn5aZ78i-u5IAQUb4@z> ----- On Jul 15, 2020, at 2:28 PM, rostedt rostedt@goodmis.org wrote: > On Wed, 15 Jul 2020 20:37:16 +0430 > ahmadkhorrami wrote: > >> Hi, >> What is the most efficient way to capture occurrence of a function >> call/return of a binary program in userspace? >> It seems the answer is Uprobes. 1) Am I right? >> But Uprobes use "int" instruction which leads to a switch into kernel >> mode. 2) Wouldn't it be better to avoid this transition? >> I'm looking forward to your reply and will be happy to read your >> opinions. >> Regards. > > > Hi, I believe LTTng has utilities that can help you trace user space > programs. Indeed, it is documented here: https://lttng.org/docs/#doc-liblttng-ust-cyg-profile If your program is generating function entry/exit at a very high rate (which goes beyond your available I/O throughput and lasts longer than the memory you have available for ring buffers), you will also probably want to use the "blocking-timeout" option documented at: https://lttng.org/docs/#doc-enabling-disabling-channels Thanks, Mathieu > > I think there's also a users ftrace like utility that Namhyung was > working on. But I don't know where in the development that is. > > -- Steve -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev