From patchwork Fri Dec 17 05:50:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683703 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55695C43219 for ; Fri, 17 Dec 2021 05:50:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233087AbhLQFuv (ORCPT ); Fri, 17 Dec 2021 00:50:51 -0500 Received: from sin.source.kernel.org ([145.40.73.55]:49988 "EHLO sin.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229985AbhLQFut (ORCPT ); Fri, 17 Dec 2021 00:50:49 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 6AAF8CE23E8 for ; Fri, 17 Dec 2021 05:50:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7628EC36AE1; Fri, 17 Dec 2021 05:50:44 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-00056Y-BI; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 01/15] libtracefs: Update gitignore file Date: Fri, 17 Dec 2021 00:50:27 -0500 Message-Id: <20211217055041.19559-2-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" Add more files that should be ignored in the build. For some reason the .o files were not ignored. Also ignore the dependency .d files. And a few miscellaneous files. Signed-off-by: Steven Rostedt (VMware) --- .gitignore | 4 ++++ Documentation/.gitignore | 1 + 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index ff3e01438270..88c9b42f1a28 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,11 @@ libtracefs.pc TAGS tags lib/ +bin/ patches/ build_prefix build_uninstall tfs_version.h +*.o +*.d +sqlhist diff --git a/Documentation/.gitignore b/Documentation/.gitignore index 747b2584d55b..4d2414d3f6b6 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore @@ -1,4 +1,5 @@ *.3 +sqlhist.1 *.m *.xml *.html From patchwork Fri Dec 17 05:50:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683705 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F1F0C433EF for ; Fri, 17 Dec 2021 05:50:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229985AbhLQFuv (ORCPT ); Fri, 17 Dec 2021 00:50:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233093AbhLQFut (ORCPT ); Fri, 17 Dec 2021 00:50:49 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F688C06173E for ; Thu, 16 Dec 2021 21:50:49 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CDEA2B8273C for ; Fri, 17 Dec 2021 05:50:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9403BC36AEE; Fri, 17 Dec 2021 05:50:44 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-00056b-Bu; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 02/15] libtracefs: Have make tags and TAGS honor O= build directory Date: Fri, 17 Dec 2021 00:50:28 -0500 Message-Id: <20211217055041.19559-3-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" Currently if one does a "make O=/tmp/build tags" the tags are still built in the source directory. Although this is uncommon to do, the tags (and TAGS) target should still honor the build directory. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 85b3c39a867c..4910ebe140b9 100644 --- a/Makefile +++ b/Makefile @@ -207,7 +207,7 @@ endif $(src)/$(UTEST_DIR)/$(UTEST_BINARY) define find_tag_files - find . -name '\.pc' -prune -o -name '*\.[ch]' -print -o -name '*\.[ch]pp' \ + find $(src) -name '\.pc' -prune -o -name '*\.[ch]' -print -o -name '*\.[ch]pp' \ ! -name '\.#' -print endef @@ -230,18 +230,26 @@ $(BUILD_PREFIX): force $(PKG_CONFIG_FILE) : ${PKG_CONFIG_SOURCE_FILE}.template $(BUILD_PREFIX) $(VERSION_FILE) $(Q) $(call do_make_pkgconfig_file,$(prefix)) -tags: force - $(RM) tags - $(call find_tag_files) | xargs ctags --extra=+f --c-kinds=+px +VIM_TAGS = $(obj)/tags +EMACS_TAGS = $(obj)/TAGS +CSCOPE_TAGS = $(obj)/cscope -TAGS: force - $(RM) TAGS - $(call find_tag_files) | xargs etags +$(VIM_TAGS): force + $(RM) $@ + $(call find_tag_files) | (cd $(obj) && xargs ctags --extra=+f --c-kinds=+px) -cscope: force - $(RM) cscope* +$(EMACS_TAGS): force + $(RM) $@ + $(call find_tag_files) | (cd $(obj) && xargs etags) + +$(CSCOPE_TAGS): force + $(RM) $(obj)/cscope* $(call find_tag_files) | cscope -b -q +tags: $(VIM_TAGS) +TAGS: $(EMACS_TAGS) +cscope: $(CSCOPE_TAGS) + ifeq ("$(DESTDIR)", "") # If DESTDIR is not defined, then test if after installing the library # and running ldconfig, if the library is visible by ld.so. From patchwork Fri Dec 17 05:50:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683691 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54D7EC433F5 for ; Fri, 17 Dec 2021 05:50:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233077AbhLQFuq (ORCPT ); Fri, 17 Dec 2021 00:50:46 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:60304 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229985AbhLQFuq (ORCPT ); Fri, 17 Dec 2021 00:50:46 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A406EB82736 for ; Fri, 17 Dec 2021 05:50:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80D8CC36AEA; Fri, 17 Dec 2021 05:50:44 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-00056e-Ca; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 03/15] libtracefs: Fix stream example Date: Fri, 17 Dec 2021 00:50:29 -0500 Message-Id: <20211217055041.19559-4-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" The sample in libtracefs-stream.txt references SPLICE_F_NONBLOCK but that requires including "fcntl.h" and defining _GNU_SOURCE. Without that, the sample fails to compile. Adding $(CFLAGS) to the build adds the _GNU_SOURCE define. Signed-off-by: Steven Rostedt (VMware) --- Documentation/libtracefs-stream.txt | 1 + samples/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/libtracefs-stream.txt b/Documentation/libtracefs-stream.txt index 7d723c5e5673..68ec8c3649ba 100644 --- a/Documentation/libtracefs-stream.txt +++ b/Documentation/libtracefs-stream.txt @@ -51,6 +51,7 @@ EXAMPLE #include #include #include +#include #include diff --git a/samples/Makefile b/samples/Makefile index 6ee57fecacbd..4ccd28dcebaa 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -63,7 +63,7 @@ $(EXAMPLES): $(patsubst %,$(bdir)/%,$(TARGETS)) # $(CC) -g -Wall -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) $(bdir)/%.o: %.c - $(CC) -g -Wall -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) + $(CC) -g -Wall -c $(CFLAGS) -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) clean: $(RM) $(bdir)/* From patchwork Fri Dec 17 05:50:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683693 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4217BC433F5 for ; Fri, 17 Dec 2021 05:50:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233096AbhLQFut (ORCPT ); Fri, 17 Dec 2021 00:50:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233088AbhLQFus (ORCPT ); Fri, 17 Dec 2021 00:50:48 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60A2CC06173E for ; Thu, 16 Dec 2021 21:50:48 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 7BCBDCE23EB for ; Fri, 17 Dec 2021 05:50:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85839C36AEB; Fri, 17 Dec 2021 05:50:44 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-00056h-DD; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 04/15] libtracefs: Fix samples Makefile Date: Fri, 17 Dec 2021 00:50:30 -0500 Message-Id: <20211217055041.19559-5-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" The commit that was added to build the samples was not fully committed, and it did not build properly. Fix the Makefile so that the sample code now builds. Signed-off-by: Steven Rostedt (VMware) --- samples/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/samples/Makefile b/samples/Makefile index 4ccd28dcebaa..1e4fe7fb2144 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -26,31 +26,31 @@ TARGETS += $(EXAMPLES) bdir := $(obj)/bin +TARGETS := $(patsubst %,$(bdir)/%,$(TARGETS)) + all: $(TARGETS) extract_example = \ cat $1 | sed -ne '/^EXAMPLE/,/FILES/ { /EXAMPLE/,+2d ; /^FILES/d ; /^--/d ; p}' > $2 -$(bdir)/sqlhist.c: ../Documentation/libtracefs-sql.txt +$(bdir)/sqlhist.c: $(src)/Documentation/libtracefs-sql.txt $(call extract_example,$<,$@) -EXAMPLE_C_CODE := $(patsubst %,$(bdir)/%.c,$(EXAMPLES)) - $(bdir)/%.c: ../Documentation/libtracefs-%.txt $(call extract_example,$<,$@) $(bdir): @mkdir -p $(bdir) -sqlhist: $(bdir) $(bdir) $(bdir)/sqlhist +sqlhist: $(bdir)/sqlhist.c $(TARGETS): $(bdir) # sqlhist is unique and stands on its own -sqlhist: $(bdir)/sqlhist +$(bdir)/sqlhist: $(bdir)/sqlhist.c $(bdir)/%: $(bdir)/%.o - $(CC) -o $@ $^ $(LIBTRACEFS_STATIC) $(LIBTRACEEVENT_LIBS) + $(CC) -o $@ $< $(CFLAGS) $(LIBTRACEFS_STATIC) $(LIBTRACEEVENT_LIBS) $(EXAMPLES): $(patsubst %,$(bdir)/%,$(TARGETS)) @@ -60,9 +60,9 @@ $(EXAMPLES): $(patsubst %,$(bdir)/%,$(TARGETS)) ## name, and the file will not be discarded by make. # # $(bdir)/XX.o: $(bdir)/XX.c -# $(CC) -g -Wall -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) +# $(CC) -g -Wall $(CFLAGS) -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) -$(bdir)/%.o: %.c +$(bdir)/%.o: $(bdir)/%.c $(CC) -g -Wall -c $(CFLAGS) -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) clean: From patchwork Fri Dec 17 05:50:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683707 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59551C4321E for ; Fri, 17 Dec 2021 05:50:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233103AbhLQFuw (ORCPT ); Fri, 17 Dec 2021 00:50:52 -0500 Received: from sin.source.kernel.org ([145.40.73.55]:50026 "EHLO sin.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233095AbhLQFuu (ORCPT ); Fri, 17 Dec 2021 00:50:50 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 7CC8BCE23EE for ; Fri, 17 Dec 2021 05:50:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DA94C36AF1; Fri, 17 Dec 2021 05:50:44 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-00056k-Ds; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 05/15] libtracefs: Remove unused "bindir" from Makefile Date: Fri, 17 Dec 2021 00:50:31 -0500 Message-Id: <20211217055041.19559-6-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" It appears the the bindir variables are not used to build or install the library. Remove them from the Makefile as they just add unnecessary noise. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 4910ebe140b9..d92bec9f1ed7 100644 --- a/Makefile +++ b/Makefile @@ -52,8 +52,6 @@ endif libdir_relative ?= $(libdir_relative_temp) prefix ?= /usr/local -bindir_relative = bin -bindir = $(prefix)/$(bindir_relative) man_dir = $(prefix)/share/man man_dir_SQ = '$(subst ','\'',$(man_dir))' libdir = $(prefix)/$(libdir_relative) @@ -82,10 +80,6 @@ export man_dir man_dir_SQ html_install html_install_SQ INSTALL export img_install img_install_SQ export DESTDIR DESTDIR_SQ -# Shell quotes -bindir_SQ = $(subst ','\'',$(bindir)) -bindir_relative_SQ = $(subst ','\'',$(bindir_relative)) - pound := \# HELP_DIR = -DHELP_DIR=$(html_install) @@ -130,7 +124,7 @@ src := $(srctree) obj := $(objtree) bdir := $(obj)/lib/tracefs -export prefix bindir src obj bdir +export prefix src obj bdir LIBTRACEFS_STATIC = $(bdir)/libtracefs.a LIBTRACEFS_SHARED = $(bdir)/libtracefs.so.$(TRACEFS_VERSION) From patchwork Fri Dec 17 05:50:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683695 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84273C433EF for ; Fri, 17 Dec 2021 05:50:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233088AbhLQFuu (ORCPT ); Fri, 17 Dec 2021 00:50:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233082AbhLQFus (ORCPT ); Fri, 17 Dec 2021 00:50:48 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60D44C06173F for ; Thu, 16 Dec 2021 21:50:48 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 74002CE23EA for ; Fri, 17 Dec 2021 05:50:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CAFEC36AE8; Fri, 17 Dec 2021 05:50:44 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-00056n-EU; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 06/15] libtracefs: Remove unneeded blkflags from Makefile Date: Fri, 17 Dec 2021 00:50:32 -0500 Message-Id: <20211217055041.19559-7-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" The blkflags were leftover from copying from trace-cmd for handling the blk tracer. They are not needed for the libtracefs library. Remove them. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index d92bec9f1ed7..07c9496364bd 100644 --- a/Makefile +++ b/Makefile @@ -104,9 +104,6 @@ SILENT := $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),1) test-build = $(if $(shell sh -c 'echo "$(1)" | \ $(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y'), $2) -# have flush/fua block layer instead of barriers? -blk-flags := $(call test-build,$(BLK_TC_FLUSH_SOURCE),-DHAVE_BLK_TC_FLUSH) - ifeq ("$(origin O)", "command line") saved-output := $(O) From patchwork Fri Dec 17 05:50:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683701 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 518F0C43217 for ; Fri, 17 Dec 2021 05:50:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233085AbhLQFuv (ORCPT ); Fri, 17 Dec 2021 00:50:51 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:60316 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233087AbhLQFus (ORCPT ); Fri, 17 Dec 2021 00:50:48 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0AFFFB82739 for ; Fri, 17 Dec 2021 05:50:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91A57C36AEC; Fri, 17 Dec 2021 05:50:44 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-00056q-F5; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 07/15] libtracefs: Add "DESCEND" output when descending into directories during build Date: Fri, 17 Dec 2021 00:50:33 -0500 Message-Id: <20211217055041.19559-8-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" Copy from the Linux kernel a "DESCEND" output when descending into a directory during the build. This makes the output of the build a little more informative knowing what directory the build is currently in. Also add the target and not just the directory, as the build will descend into the src directory twice with different targets, and just showing that it goes into the src directory twice looks weird. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 16 ++++++++-------- scripts/utils.mk | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 07c9496364bd..2bd23c955d9a 100644 --- a/Makefile +++ b/Makefile @@ -182,7 +182,7 @@ test: force $(LIBTRACEFS_STATIC) ifneq ($(CUNIT_INSTALLED),1) $(error CUnit framework not installed, cannot build unit tests)) endif - $(Q)$(MAKE) -C $(src)/$(UTEST_DIR) $@ + $(Q)$(call descend,$(src)/$(UTEST_DIR),$@) test_mem: test ifeq (, $(VALGRIND)) @@ -279,13 +279,13 @@ install_pkgconfig: $(PKG_CONFIG_FILE) $(call do_install_pkgconfig_file,$(prefix)) doc: - $(MAKE) -C $(src)/Documentation all + $(Q)$(call descend,$(src)/Documentation,all) doc_clean: - $(MAKE) -C $(src)/Documentation clean + $(Q)$(call descend,$(src)/Documentation,clean) install_doc: - $(MAKE) -C $(src)/Documentation install + $(Q)$(call descend,$(src)/Documentation,install) define build_uninstall_script $(Q)mkdir $(BUILD_OUTPUT)/tmp_build @@ -358,19 +358,19 @@ $(VERSION_FILE): force $(LIBTRACEFS_STATIC): force $(Q)mkdir -p $(bdir) - $(Q)$(MAKE) -C $(src)/src $@ + $(Q)$(call descend,$(src)/src,$@) $(bdir)/libtracefs.so.$(TRACEFS_VERSION): force $(Q)mkdir -p $(bdir) - $(Q)$(MAKE) -C $(src)/src libtracefs.so + $(Q)$(call descend,$(src)/src,libtracefs.so) samples/sqlhist: $(LIBTRACEFS_STATIC) - $(Q)$(MAKE) -C $(src)/samples sqlhist + $(Q)$(call descend,$(src)/samples,sqlhist) sqlhist: samples/sqlhist samples: $(LIBTRACEFS_STATIC) force - $(Q)$(MAKE) -C $(src)/samples all + $(Q)$(call descend,$(src)/samples,all) clean: $(MAKE) -C $(src)/utest clean diff --git a/scripts/utils.mk b/scripts/utils.mk index 0b3c0675b714..404b929a2b5f 100644 --- a/scripts/utils.mk +++ b/scripts/utils.mk @@ -3,6 +3,8 @@ # Utils GOBJ = $(notdir $(strip $@)) + BASE1 = $(notdir $(strip $1)) + BASE2 = $(notdir $(strip $2)) ifeq ($(VERBOSE),1) @@ -24,6 +26,7 @@ ifeq ($(findstring 1,$(SILENT)$(VERBOSE)),1) print_install = print_uninstall = print_update = + print_descend = else print_compile = echo ' COMPILE '$(GOBJ); print_app_build = echo ' BUILD '$(GOBJ); @@ -35,6 +38,7 @@ else print_install = echo ' INSTALL '$1' to $(DESTDIR_SQ)$2'; print_uninstall = echo ' UNINSTALL $(DESTDIR_SQ)$1'; print_update = echo ' UPDATE '$(GOBJ); + print_descend = echo ' DESCEND '$(BASE1) $(BASE2); endif do_fpic_compile = \ @@ -74,6 +78,22 @@ do_python_plugin_build = \ ($(print_plugin_build) \ $(CC) $< -shared $(LDFLAGS) $(PYTHON_LDFLAGS) -o $@) +ifneq ($(findstring $(MAKEFLAGS), w),w) +PRINT_DIR = --no-print-directory +else +NO_SUBDIR = : +endif + +# +# Define a callable command for descending to a new directory +# +# Call by doing: $(call descend,directory[,target]) +# +descend = \ + ($(print_descend) \ + $(MAKE) $(PRINT_DIR) -C $(1) $(2)) + + define make_version.h (echo '/* This file is automatically generated. Do not modify. */'; \ echo \#define VERSION_CODE $(shell \ From patchwork Fri Dec 17 05:50:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3132C433F5 for ; Fri, 17 Dec 2021 05:50:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233093AbhLQFuw (ORCPT ); Fri, 17 Dec 2021 00:50:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233092AbhLQFus (ORCPT ); Fri, 17 Dec 2021 00:50:48 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 609A5C061574 for ; Thu, 16 Dec 2021 21:50:48 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 71199CE23AF for ; Fri, 17 Dec 2021 05:50:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7858CC36AE9; Fri, 17 Dec 2021 05:50:44 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-00056t-Fi; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 08/15] libtracefs: Have make clean output cleaner Date: Fri, 17 Dec 2021 00:50:34 -0500 Message-Id: <20211217055041.19559-9-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" Instead of showing the files being removed by make clean, just output a command stating what directory the clean is happening in. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 13 +++++++------ samples/Makefile | 2 +- scripts/utils.mk | 8 ++++++++ src/Makefile | 2 +- utest/Makefile | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 2bd23c955d9a..bf085bfdb800 100644 --- a/Makefile +++ b/Makefile @@ -373,11 +373,12 @@ samples: $(LIBTRACEFS_STATIC) force $(Q)$(call descend,$(src)/samples,all) clean: - $(MAKE) -C $(src)/utest clean - $(MAKE) -C $(src)/src clean - $(MAKE) -C $(src)/samples clean - $(RM) $(TARGETS) $(bdir)/*.a $(bdir)/*.so $(bdir)/*.so.* $(bdir)/*.o $(bdir)/.*.d - $(RM) $(PKG_CONFIG_FILE) - $(RM) $(VERSION_FILE) + $(Q)$(MAKE) -C $(src)/utest clean + $(Q)$(MAKE) -C $(src)/src clean + $(Q)$(MAKE) -C $(src)/samples clean + $(Q)$(call do_clean, \ + $(TARGETS) $(bdir)/*.a $(bdir)/*.so $(bdir)/*.so.* $(bdir)/*.o $(bdir)/.*.d \ + $(PKG_CONFIG_FILE) \ + $(VERSION_FILE)) .PHONY: clean diff --git a/samples/Makefile b/samples/Makefile index 1e4fe7fb2144..033f1ca735f4 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -66,4 +66,4 @@ $(bdir)/%.o: $(bdir)/%.c $(CC) -g -Wall -c $(CFLAGS) -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) clean: - $(RM) $(bdir)/* + $(Q)$(call do_clean,$(bdir)/*) diff --git a/scripts/utils.mk b/scripts/utils.mk index 404b929a2b5f..c9b908f1c5d9 100644 --- a/scripts/utils.mk +++ b/scripts/utils.mk @@ -2,9 +2,11 @@ # Utils + PWD := $(shell /bin/pwd) GOBJ = $(notdir $(strip $@)) BASE1 = $(notdir $(strip $1)) BASE2 = $(notdir $(strip $2)) + BASEPWD = $(notdir $(strip $(PWD))) ifeq ($(VERBOSE),1) @@ -27,6 +29,7 @@ ifeq ($(findstring 1,$(SILENT)$(VERBOSE)),1) print_uninstall = print_update = print_descend = + print_clean = else print_compile = echo ' COMPILE '$(GOBJ); print_app_build = echo ' BUILD '$(GOBJ); @@ -39,6 +42,7 @@ else print_uninstall = echo ' UNINSTALL $(DESTDIR_SQ)$1'; print_update = echo ' UPDATE '$(GOBJ); print_descend = echo ' DESCEND '$(BASE1) $(BASE2); + print_clean = echo ' CLEAN '$(BASEPWD); endif do_fpic_compile = \ @@ -78,6 +82,10 @@ do_python_plugin_build = \ ($(print_plugin_build) \ $(CC) $< -shared $(LDFLAGS) $(PYTHON_LDFLAGS) -o $@) +do_clean = \ + ($(print_clean) \ + $(RM) $1) + ifneq ($(findstring $(MAKEFLAGS), w),w) PRINT_DIR = --no-print-directory else diff --git a/src/Makefile b/src/Makefile index cda0a0cda6e3..8f258a218f97 100644 --- a/src/Makefile +++ b/src/Makefile @@ -61,7 +61,7 @@ $(OBJS): | $(bdir) $(DEPS): | $(bdir) clean: - $(RM) $(OBJS) + $(Q)$(call do_clean,$(OBJS)) dep_includes := $(wildcard $(DEPS)) diff --git a/utest/Makefile b/utest/Makefile index 48993650660c..d168b01a328c 100644 --- a/utest/Makefile +++ b/utest/Makefile @@ -40,4 +40,4 @@ dep_includes := $(wildcard $(DEPS)) test: $(TARGETS) clean: - $(RM) $(TARGETS) $(bdir)/*.o $(bdir)/.*.d + $(Q)$(call do_clean,$(TARGETS) $(bdir)/*.o $(bdir)/.*.d) From patchwork Fri Dec 17 05:50:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683697 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 221A9C433FE for ; Fri, 17 Dec 2021 05:50:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233079AbhLQFuu (ORCPT ); Fri, 17 Dec 2021 00:50:50 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:60312 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233085AbhLQFus (ORCPT ); Fri, 17 Dec 2021 00:50:48 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 06EAFB82738 for ; Fri, 17 Dec 2021 05:50:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8731DC36AED; Fri, 17 Dec 2021 05:50:44 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-00056w-GL; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 09/15] libtracefs: Quiet mv: cannot stat message for libtracefs.a Date: Fri, 17 Dec 2021 00:50:35 -0500 Message-Id: <20211217055041.19559-10-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" The following shows up on a normal make: mv: cannot stat '/work/git/libtracefs.git/lib/tracefs/libtracefs.a': No such file or directory In order to help with a multithreaded make, the moving of the libtracefs.a before removing it appears to fix some issues. But now we get a message if it doesn't already exist. Only move it and remove it if it already exists. Fixes: 550d8358 ("libtracefs: make the libtracefs.a gen more robust") Signed-off-by: Steven Rostedt (VMware) --- scripts/utils.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/utils.mk b/scripts/utils.mk index c9b908f1c5d9..af0f14fcbfa7 100644 --- a/scripts/utils.mk +++ b/scripts/utils.mk @@ -60,7 +60,10 @@ do_app_build = \ do_build_static_lib = \ ($(print_static_lib_build) \ - mv $@ $@.rm; $(RM) $@.rm; $(AR) rcs $@ $^) + if [ -f $@ ]; then \ + mv $@ $@.rm; $(RM) $@.rm; \ + fi; \ + $(AR) rcs $@ $^) do_compile_shared_library = \ ($(print_shared_lib_compile) \ From patchwork Fri Dec 17 05:50:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683715 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B477AC433F5 for ; Fri, 17 Dec 2021 05:50:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233101AbhLQFuz (ORCPT ); Fri, 17 Dec 2021 00:50:55 -0500 Received: from sin.source.kernel.org ([145.40.73.55]:50066 "EHLO sin.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233102AbhLQFuw (ORCPT ); Fri, 17 Dec 2021 00:50:52 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 29BCCCE23EE for ; Fri, 17 Dec 2021 05:50:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65367C36AE9; Fri, 17 Dec 2021 05:50:49 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-00056z-Gz; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 10/15] libtracefs: Quiet "Nothing to be done for" messages Date: Fri, 17 Dec 2021 00:50:36 -0500 Message-Id: <20211217055041.19559-11-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" When doing a make after everything is already built, we have "Nothing to de done" messages that are rather annoying. $ make DESCEND src libtracefs.so make[1]: Nothing to be done for 'libtracefs.so'. DESCEND src libtracefs.a make[1]: '/work/git/libtracefs.git/lib/tracefs/libtracefs.a' is up to date. This is because the target in the src directory for these are already done, so it reports there is nothing to be done, as that's what make does if you specify a target (and the descent into he directory specifies the target that is displayed). By marking the target as .PHONY will suppress that message. Because "libtracefs.so" depends on $(LIBTRACEFS_SHARED_SO), the latter needs to be part of the .PHONY and not the former. Signed-off-by: Steven Rostedt (VMware) --- src/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Makefile b/src/Makefile index 8f258a218f97..f284c70a640a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -70,3 +70,5 @@ ifneq ($(dep_includes),) endif $(bdir)/tracefs-sqlhist.o tracefs-sqlhist.o: sqlhist.tab.h + +.PHONY: $(LIBTRACEFS_SHARED_SO) $(LIBTRACEFS_STATIC) From patchwork Fri Dec 17 05:50:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683721 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 731F2C43217 for ; Fri, 17 Dec 2021 05:50:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233104AbhLQFu4 (ORCPT ); Fri, 17 Dec 2021 00:50:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233105AbhLQFux (ORCPT ); Fri, 17 Dec 2021 00:50:53 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFC35C061574 for ; Thu, 16 Dec 2021 21:50:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 27035CE23AF for ; Fri, 17 Dec 2021 05:50:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 639D4C36AE2; Fri, 17 Dec 2021 05:50:49 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-000572-He; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 11/15] libtracefs: Have sample build look cleaner Date: Fri, 17 Dec 2021 00:50:37 -0500 Message-Id: <20211217055041.19559-12-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" The build of the samples directory just showed the raw commands. This is inconsistent with the rest of the build system. Make it cleaner by showing EXTRACT, COMPILE SAMPLE OBJ and COMPILE SAMPLE for the samples being extracted and built. Signed-off-by: Steven Rostedt (VMware) --- samples/Makefile | 7 ++----- scripts/utils.mk | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/samples/Makefile b/samples/Makefile index 033f1ca735f4..48c0e0e4160d 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -30,9 +30,6 @@ TARGETS := $(patsubst %,$(bdir)/%,$(TARGETS)) all: $(TARGETS) -extract_example = \ - cat $1 | sed -ne '/^EXAMPLE/,/FILES/ { /EXAMPLE/,+2d ; /^FILES/d ; /^--/d ; p}' > $2 - $(bdir)/sqlhist.c: $(src)/Documentation/libtracefs-sql.txt $(call extract_example,$<,$@) @@ -50,7 +47,7 @@ $(TARGETS): $(bdir) $(bdir)/sqlhist: $(bdir)/sqlhist.c $(bdir)/%: $(bdir)/%.o - $(CC) -o $@ $< $(CFLAGS) $(LIBTRACEFS_STATIC) $(LIBTRACEEVENT_LIBS) + $(call do_sample_build,$@,$<) $(EXAMPLES): $(patsubst %,$(bdir)/%,$(TARGETS)) @@ -63,7 +60,7 @@ $(EXAMPLES): $(patsubst %,$(bdir)/%,$(TARGETS)) # $(CC) -g -Wall $(CFLAGS) -c -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) $(bdir)/%.o: $(bdir)/%.c - $(CC) -g -Wall -c $(CFLAGS) -o $@ $^ -I../include/ $(LIBTRACEEVENT_INCLUDES) + $(call do_sample_obj,$@,$^) clean: $(Q)$(call do_clean,$(bdir)/*) diff --git a/scripts/utils.mk b/scripts/utils.mk index af0f14fcbfa7..0f6225d3ee68 100644 --- a/scripts/utils.mk +++ b/scripts/utils.mk @@ -30,6 +30,9 @@ ifeq ($(findstring 1,$(SILENT)$(VERBOSE)),1) print_update = print_descend = print_clean = + print_extract = + print_sample_build = + print_sample_obj = else print_compile = echo ' COMPILE '$(GOBJ); print_app_build = echo ' BUILD '$(GOBJ); @@ -43,6 +46,9 @@ else print_update = echo ' UPDATE '$(GOBJ); print_descend = echo ' DESCEND '$(BASE1) $(BASE2); print_clean = echo ' CLEAN '$(BASEPWD); + print_extract = echo ' EXTRACT '$(GOBJ); + print_sample_build = echo ' COMPILE SAMPLE '$(GOBJ); + print_sample_obj = echo ' COMPILE SAMPLE OBJ '$(GOBJ); endif do_fpic_compile = \ @@ -89,6 +95,18 @@ do_clean = \ ($(print_clean) \ $(RM) $1) +extract_example = \ + $(Q)($(print_extract) \ + cat $1 | sed -ne '/^EXAMPLE/,/FILES/ { /EXAMPLE/,+2d ; /^FILES/d ; /^--/d ; p}' > $2) + +do_sample_build = \ + $(Q)($(print_sample_build) \ + $(CC) -o $1 $2 $(CFLAGS) $(LIBTRACEFS_STATIC) $(LIBTRACEEVENT_LIBS)) + +do_sample_obj = \ + $(Q)($(print_sample_obj) \ + $(CC) -g -Wall -c $(CFLAGS) -o $1 $2 -I../include/ $(LIBTRACEEVENT_INCLUDES)) + ifneq ($(findstring $(MAKEFLAGS), w),w) PRINT_DIR = --no-print-directory else From patchwork Fri Dec 17 05:50:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683713 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8181EC433EF for ; Fri, 17 Dec 2021 05:50:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233098AbhLQFux (ORCPT ); Fri, 17 Dec 2021 00:50:53 -0500 Received: from sin.source.kernel.org ([145.40.73.55]:50062 "EHLO sin.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233101AbhLQFuw (ORCPT ); Fri, 17 Dec 2021 00:50:52 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 27C48CE20F3 for ; Fri, 17 Dec 2021 05:50:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 653A0C36AEA; Fri, 17 Dec 2021 05:50:49 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-000575-IL; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 12/15] libtracefs: Have samples build in separate directory from bin Date: Fri, 17 Dec 2021 00:50:38 -0500 Message-Id: <20211217055041.19559-13-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" The samples destination directory is bin/. Do not build in that directory. Have it build in the default directory, and then it can be set to build in the same directory as the source (or copy if it is a remote build). Signed-off-by: Steven Rostedt (VMware) --- samples/Makefile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/samples/Makefile b/samples/Makefile index 48c0e0e4160d..ace93448ff4e 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -24,9 +24,9 @@ TARGETS := TARGETS += sqlhist TARGETS += $(EXAMPLES) -bdir := $(obj)/bin +sdir := $(obj)/bin -TARGETS := $(patsubst %,$(bdir)/%,$(TARGETS)) +TARGETS := $(patsubst %,$(sdir)/%,$(TARGETS)) all: $(TARGETS) @@ -36,20 +36,21 @@ $(bdir)/sqlhist.c: $(src)/Documentation/libtracefs-sql.txt $(bdir)/%.c: ../Documentation/libtracefs-%.txt $(call extract_example,$<,$@) -$(bdir): - @mkdir -p $(bdir) +$(sdir): + @mkdir -p $(sdir) -sqlhist: $(bdir)/sqlhist.c +sqlhist: $(sdir)/sqlhist -$(TARGETS): $(bdir) +$(TARGETS): $(sdir) # sqlhist is unique and stands on its own -$(bdir)/sqlhist: $(bdir)/sqlhist.c +$(sdir)/sqlhist: $(bdir)/sqlhist.c + $(call do_sample_build,$@,$<) -$(bdir)/%: $(bdir)/%.o +$(sdir)/%: $(bdir)/%.o $(call do_sample_build,$@,$<) -$(EXAMPLES): $(patsubst %,$(bdir)/%,$(TARGETS)) +$(EXAMPLES): $(patsubst %,$(sdir)/%,$(TARGETS)) ## The intermediate files get removed by Make. ## To examine the .c files created by one of the man pages, @@ -63,4 +64,4 @@ $(bdir)/%.o: $(bdir)/%.c $(call do_sample_obj,$@,$^) clean: - $(Q)$(call do_clean,$(bdir)/*) + $(Q)$(call do_clean,$(sdir)/* $(bdir)/sqlhist.c $(bdir)/sqlhist.o) From patchwork Fri Dec 17 05:50:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683719 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C013C433FE for ; Fri, 17 Dec 2021 05:50:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233092AbhLQFuz (ORCPT ); Fri, 17 Dec 2021 00:50:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233104AbhLQFux (ORCPT ); Fri, 17 Dec 2021 00:50:53 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA1B9C06173E for ; Thu, 16 Dec 2021 21:50:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 3236CCE23F1 for ; Fri, 17 Dec 2021 05:50:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69A0EC36AEB; Fri, 17 Dec 2021 05:50:49 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-000578-J1; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 13/15] libtracefs: Build in the same directories as the source Date: Fri, 17 Dec 2021 00:50:39 -0500 Message-Id: <20211217055041.19559-14-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" Modify the descend macro to create the same directory as the source is in and build the objects in that directory. Sort out the "lib" directory to only have the libraries built in that directory. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 18 ++++++++++-------- scripts/utils.mk | 3 ++- src/Makefile | 3 --- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index bf085bfdb800..6e18e0a015f5 100644 --- a/Makefile +++ b/Makefile @@ -119,13 +119,16 @@ srctree := $(if $(BUILD_SRC),$(BUILD_SRC),$(CURDIR)) objtree := $(BUILD_OUTPUT) src := $(srctree) obj := $(objtree) -bdir := $(obj)/lib/tracefs +bdir := $(obj)/lib export prefix src obj bdir LIBTRACEFS_STATIC = $(bdir)/libtracefs.a LIBTRACEFS_SHARED = $(bdir)/libtracefs.so.$(TRACEFS_VERSION) +LIBTRACEFS_SHARED_SO = $(bdir)/libtracefs.so +LIBTRACEFS_SHARED_VERSION = $(bdir)/libtracefs.so.$(TFS_VERSION) + PKG_CONFIG_SOURCE_FILE = libtracefs.pc PKG_CONFIG_FILE := $(addprefix $(obj)/,$(PKG_CONFIG_SOURCE_FILE)) @@ -134,6 +137,7 @@ LIBS = $(LIBTRACEEVENT_LIBS) -lpthread export LIBS export LIBTRACEFS_STATIC LIBTRACEFS_SHARED export LIBTRACEEVENT_LIBS LIBTRACEEVENT_INCLUDES +export LIBTRACEFS_SHARED_SO LIBTRACEFS_SHARED_VERSION export Q SILENT VERBOSE EXT @@ -165,12 +169,12 @@ LIB_TARGET = libtracefs.a libtracefs.so.$(TRACEFS_VERSION) LIB_INSTALL = libtracefs.a libtracefs.so* LIB_INSTALL := $(addprefix $(bdir)/,$(LIB_INSTALL)) -TARGETS = $(LIBTRACEFS_SHARED) $(LIBTRACEFS_STATIC) +TARGETS = libtracefs.so libtracefs.a all_cmd: $(TARGETS) $(PKG_CONFIG_FILE) -libtracefs.a: $(LIBTRACEFS_STATIC) -libtracefs.so: $(LIBTRACEFS_SHARED) +libtracefs.a: $(bdir) $(LIBTRACEFS_STATIC) +libtracefs.so: $(bdir) $(LIBTRACEFS_SHARED) libs: libtracefs.a libtracefs.so @@ -357,19 +361,17 @@ $(VERSION_FILE): force $(Q)$(call update_version.h) $(LIBTRACEFS_STATIC): force - $(Q)mkdir -p $(bdir) $(Q)$(call descend,$(src)/src,$@) $(bdir)/libtracefs.so.$(TRACEFS_VERSION): force - $(Q)mkdir -p $(bdir) $(Q)$(call descend,$(src)/src,libtracefs.so) -samples/sqlhist: $(LIBTRACEFS_STATIC) +samples/sqlhist: libtracefs.a $(Q)$(call descend,$(src)/samples,sqlhist) sqlhist: samples/sqlhist -samples: $(LIBTRACEFS_STATIC) force +samples: libtracefs.a force $(Q)$(call descend,$(src)/samples,all) clean: diff --git a/scripts/utils.mk b/scripts/utils.mk index 0f6225d3ee68..3bf59c550b1d 100644 --- a/scripts/utils.mk +++ b/scripts/utils.mk @@ -120,7 +120,8 @@ endif # descend = \ ($(print_descend) \ - $(MAKE) $(PRINT_DIR) -C $(1) $(2)) + mkdir -p $(obj)/$(BASE1); \ + $(MAKE) $(PRINT_DIR) bdir=$(obj)/$(BASE1) -C $(1) $(2)) define make_version.h diff --git a/src/Makefile b/src/Makefile index f284c70a640a..985744ba1118 100644 --- a/src/Makefile +++ b/src/Makefile @@ -22,9 +22,6 @@ OBJS += tracefs-sqlhist.o OBJS := $(OBJS:%.o=$(bdir)/%.o) DEPS := $(OBJS:$(bdir)/%.o=$(bdir)/.%.d) -LIBTRACEFS_SHARED_SO = $(bdir)/libtracefs.so -LIBTRACEFS_SHARED_VERSION = $(bdir)/libtracefs.so.$(TFS_VERSION) - $(LIBTRACEFS_STATIC): $(OBJS) $(Q)$(call do_build_static_lib) From patchwork Fri Dec 17 05:50:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683711 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9617DC4167B for ; Fri, 17 Dec 2021 05:50:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233095AbhLQFux (ORCPT ); Fri, 17 Dec 2021 00:50:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233098AbhLQFuw (ORCPT ); Fri, 17 Dec 2021 00:50:52 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBAEDC061574 for ; Thu, 16 Dec 2021 21:50:51 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 94D02B82739 for ; Fri, 17 Dec 2021 05:50:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61E31C36AE1; Fri, 17 Dec 2021 05:50:49 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-00057B-Je; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 14/15] libtracefs: Add clean descend Date: Fri, 17 Dec 2021 00:50:40 -0500 Message-Id: <20211217055041.19559-15-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" Have the output of cleaning a directory be a bit cleaner. This actually breaks the clean, but because of the way samples works, to fix that first will delete the Makefile of samples. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 6 +++--- scripts/utils.mk | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6e18e0a015f5..cd7cf28a2acd 100644 --- a/Makefile +++ b/Makefile @@ -375,9 +375,9 @@ samples: libtracefs.a force $(Q)$(call descend,$(src)/samples,all) clean: - $(Q)$(MAKE) -C $(src)/utest clean - $(Q)$(MAKE) -C $(src)/src clean - $(Q)$(MAKE) -C $(src)/samples clean + $(Q)$(call descend_clean,utest) + $(Q)$(call descend_clean,src) + $(Q)$(call descend_clean,samples) $(Q)$(call do_clean, \ $(TARGETS) $(bdir)/*.a $(bdir)/*.so $(bdir)/*.so.* $(bdir)/*.o $(bdir)/.*.d \ $(PKG_CONFIG_FILE) \ diff --git a/scripts/utils.mk b/scripts/utils.mk index 3bf59c550b1d..5f43de1385cd 100644 --- a/scripts/utils.mk +++ b/scripts/utils.mk @@ -123,6 +123,8 @@ descend = \ mkdir -p $(obj)/$(BASE1); \ $(MAKE) $(PRINT_DIR) bdir=$(obj)/$(BASE1) -C $(1) $(2)) +descend_clean = \ + $(MAKE) $(PRINT_DIR) bdir=$(obj)/$(BASE1) -C $(1) clean define make_version.h (echo '/* This file is automatically generated. Do not modify. */'; \ From patchwork Fri Dec 17 05:50:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 12683717 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB532C4332F for ; Fri, 17 Dec 2021 05:50:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233102AbhLQFuz (ORCPT ); Fri, 17 Dec 2021 00:50:55 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:60350 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233092AbhLQFux (ORCPT ); Fri, 17 Dec 2021 00:50:53 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0344AB82736 for ; Fri, 17 Dec 2021 05:50:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BD4CC36AEC; Fri, 17 Dec 2021 05:50:49 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.95) (envelope-from ) id 1my68h-00057E-KH; Fri, 17 Dec 2021 00:50:43 -0500 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: "Steven Rostedt (VMware)" Subject: [PATCH v2 15/15] libtracefs: Remove build_prefix file on make clean Date: Fri, 17 Dec 2021 00:50:41 -0500 Message-Id: <20211217055041.19559-16-rostedt@goodmis.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211217055041.19559-1-rostedt@goodmis.org> References: <20211217055041.19559-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org From: "Steven Rostedt (VMware)" The files "build_prefix" is used to help know if the libtracefs.pc file needs to be updated or not. If a remote directory is used, it is built in that directory. It should also be cleaned if a make clean is done on that directory as well. Currently deleting that file is missing from the make clean. Signed-off-by: Steven Rostedt (VMware) --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cd7cf28a2acd..544684c1c37c 100644 --- a/Makefile +++ b/Makefile @@ -381,6 +381,7 @@ clean: $(Q)$(call do_clean, \ $(TARGETS) $(bdir)/*.a $(bdir)/*.so $(bdir)/*.so.* $(bdir)/*.o $(bdir)/.*.d \ $(PKG_CONFIG_FILE) \ - $(VERSION_FILE)) + $(VERSION_FILE) \ + $(BUILD_PREFIX)) .PHONY: clean