From 1bc1754e83ea554be9d6a26c64589664651352a4 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sun, 3 Jan 2010 20:56:59 +0000 Subject: [PATCH] [package] add kmemtrace-user (#6446) SVN-Revision: 19024 --- utils/kmemtrace-user/Makefile | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 utils/kmemtrace-user/Makefile diff --git a/utils/kmemtrace-user/Makefile b/utils/kmemtrace-user/Makefile new file mode 100644 index 0000000000..37e8ee4e3a --- /dev/null +++ b/utils/kmemtrace-user/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=kmemtrace-user +PKG_VERSION:=20100102 +PKG_RELEASE:=1 +PKG_REV:=92878e602489d6a6ffd6e50b94f425c3149c86bd + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=git://repo.or.cz/kmemtrace-user.git +PKG_SOURCE_SUBDIR:=kmemtrace-user-$(PKG_VERSION) +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_PROTO:=git + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/kmemtrace-user + SECTION:=utils + CATEGORY:=Utilities + TITLE:=trace slab allocator functions + URL:=http://repo.or.cz/w/kmemtrace-user.git + KCONFIG:= \ + CONFIG_KMEMTRACE=y +endef + +define Package/kmemtrace-user/description + kmemtrace provides tracing for slab allocator functions, such as + kmalloc, kfree, kmem_cache_alloc, kmem_cache_free etc.. Collected + data is then fed to the userspace application in order to analyse + allocation hotspots, internal fragmentation and so on, making it + possible to see how well an allocator performs, as well as debug + and profile kernel code. +endef + +define Build/Configure + (cd $(PKG_BUILD_DIR); ./autogen.sh; ./configure ); + $(call Build/Configure/Default) +endef + + +define Package/kmemtrace-user/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kmemtrace-check $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kmemtrace-report $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kmemtrace-show $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kmemtraced $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,kmemtrace-user)) -- 2.30.2