From patchwork Thu Apr 8 19:46:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asaf Kahlon X-Patchwork-Id: 1464017 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=fRwumcyM; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FGWx33wSYz9sRf for ; Fri, 9 Apr 2021 05:46:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3E70C60704; Thu, 8 Apr 2021 19:46:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BJ4ygzFfWTPN; Thu, 8 Apr 2021 19:46:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 731B46072A; Thu, 8 Apr 2021 19:46:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id E23C91BF289 for ; Thu, 8 Apr 2021 19:46:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id DEBC040132 for ; Thu, 8 Apr 2021 19:46:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MMH_533BzyZO for ; Thu, 8 Apr 2021 19:46:41 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by smtp2.osuosl.org (Postfix) with ESMTPS id C5D054011B for ; Thu, 8 Apr 2021 19:46:40 +0000 (UTC) Received: by mail-wm1-x336.google.com with SMTP id g66-20020a1c39450000b0290125d187ba22so1225155wma.2 for ; Thu, 08 Apr 2021 12:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zugsFrWB7rUF1ASqHIM7bBD4KiRtvLIKadJQM3ml24s=; b=fRwumcyMM+uAup7VfvZ32RhwfMaFmJTDjXMtANGM5u6hDUSCRMNYhxu3Bxkp2n56U2 0EtERY8A/ZbOFRXuQD/btt/hDFvMICxI9yIx/VSs5c5+BIOmWF8+1COHTf4bTmfMYs+Y ZFQgMWoHWFAbBnGplMATf/jeR3qdAuwHCQB62u78D3blJ7ehqp3sFq1uCXa7WCoRBvbn ilQ/jr7tg1tpx71u+m/Qvzg62u+YhXzHfWNMLX+0rOJ55tU2gYqHg9vATSYuVEnlET5G tn4UaqKWaqIPOZnKH7kS9OGwlv+tuCFIl+fXoPX3J36J6JX9OQwp/fRemG30ohmBecHI 0CEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zugsFrWB7rUF1ASqHIM7bBD4KiRtvLIKadJQM3ml24s=; b=fezNDfV7hSlyqhwwjW6Wghr3Sxy0Mn1k/Ttoic2irmeV1viER7yHjg6ufbwooVcP95 94IAp//mHm1/UHDMkCxNSpZQ4PMQIO2DagnHSvgIXOBEww2uaSYXVV+9ah34yCrU2CEr ghFbSJFFUgpRuJd5ml21zAKLIbfKZaB019OVOGdD9GnZnyK0z8B43Mh52Tsvzee8FBZl sFpsp6/Vec7rhl1DAVVw3XYrCXa6arGt9D20SY/QDJ4SRjyJHY84+4z84sZjRoIQiZSv Vom9Yk9+hBXBNom2LDM8RPHNpO7w/a6NsbhAsN08hc53iRXLinjSvU2JAc2Msrfr8ZVH GTsg== X-Gm-Message-State: AOAM530o0+K0U3kVGLL+IUQ9kK35IrgO1FuD9zW3hXrypfTO0rAiRtmc xdU+aLhoCU0JROAWJmw57rq9g5jRp8g= X-Google-Smtp-Source: ABdhPJyHV0HAfGrxcLLdwKUzjM7I2hgwqOnNLLD+Ww7qv7rEeBExlJCYbP7iIdwnecNx4YMoMM5g/w== X-Received: by 2002:a1c:c918:: with SMTP id f24mr10955329wmb.12.1617911198685; Thu, 08 Apr 2021 12:46:38 -0700 (PDT) Received: from localhost.localdomain ([2a10:8002:6b25:0:c811:b434:a631:b424]) by smtp.gmail.com with ESMTPSA id j14sm413353wrw.69.2021.04.08.12.46.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 12:46:37 -0700 (PDT) From: Asaf Kahlon To: buildroot@buildroot.org Date: Thu, 8 Apr 2021 22:46:31 +0300 Message-Id: <20210408194631.313188-1-asafka7@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/1] package/uftrace: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Asaf Kahlon , Thomas Petazzoni , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The uftrace tool is to trace and analyze execution of a program written in C/C++. This package contains a ./configure script to check for possible extentions. This script is called directly from the Makefile, so we don't need to call it explicitly. Signed-off-by: Asaf Kahlon --- v1->v2: * amend commit message * use github macro * add _ARCH_SUPPORT * more minor refactors Signed-off-by: Asaf Kahlon --- DEVELOPERS | 1 + package/Config.in | 1 + package/uftrace/Config.in | 19 +++++++++++++++++++ package/uftrace/uftrace.hash | 3 +++ package/uftrace/uftrace.mk | 26 ++++++++++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 package/uftrace/Config.in create mode 100644 package/uftrace/uftrace.hash create mode 100644 package/uftrace/uftrace.mk diff --git a/DEVELOPERS b/DEVELOPERS index 7699c471d3..f8187dfb4d 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -240,6 +240,7 @@ F: package/python* F: package/snmpclitools/ F: package/spdlog/ F: package/uftp/ +F: package/uftrace/ F: package/uvw/ F: package/zeromq/ diff --git a/package/Config.in b/package/Config.in index 1269bc7b51..cd5cd17576 100644 --- a/package/Config.in +++ b/package/Config.in @@ -144,6 +144,7 @@ menu "Debugging, profiling and benchmark" source "package/trace-cmd/Config.in" source "package/trinity/Config.in" source "package/uclibc-ng-test/Config.in" + source "package/uftrace/Config.in" source "package/valgrind/Config.in" source "package/vmtouch/Config.in" source "package/whetstone/Config.in" diff --git a/package/uftrace/Config.in b/package/uftrace/Config.in new file mode 100644 index 0000000000..2a969445f2 --- /dev/null +++ b/package/uftrace/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_UFTRACE_ARCH_SUPPORTS + bool + default y if BR2_arm + default y if BR2_aarch64 + default y if BR2_i386 + default y if BR2_x86_64 + +config BR2_PACKAGE_UFTRACE + bool "uftrace" + depends on BR2_PACKAGE_UFTRACE_ARCH_SUPPORTS + help + The uftrace tool is to trace and analyze execution of a + program written in C/C++. It was heavily inspired by the + ftrace framework of the Linux kernel (especially function + graph tracer) and supports userspace programs. + It supports various kind of commands and filters to help + analysis of the program execution and performance. + + https://github.com/namhyung/uftrace diff --git a/package/uftrace/uftrace.hash b/package/uftrace/uftrace.hash new file mode 100644 index 0000000000..fb1e116be6 --- /dev/null +++ b/package/uftrace/uftrace.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 418d30c959d3b6d0dcafd55e588a5d414a9984b30f2522a5af004a268824a5a2 uftrace-0.9.4.tar.gz +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING diff --git a/package/uftrace/uftrace.mk b/package/uftrace/uftrace.mk new file mode 100644 index 0000000000..20425a9c48 --- /dev/null +++ b/package/uftrace/uftrace.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# uftrace +# +################################################################################ + +UFTRACE_VERSION = 0.9.4 +UFTRACE_SITE = $(call github,namhyung,uftrace,v$(UFTRACE_VERSION)) +UFTRACE_LICENSE = GPL-2.0 +UFTRACE_LICENSE_FILES = COPYING + +# uftrace always compiles a small test program to check if elfutils exists, so +# there's no special flag for it, we just need to make sure it's installed. +ifeq ($(BR2_PACKAGE_ELFUTILS),y) +UFTRACE_DEPENDENCIES += elfutils +endif + +define UFTRACE_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) ARCH=$(BR2_ARCH) $(MAKE) -C $(@D) +endef + +define UFTRACE_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package))