From: Wei Liu Subject: Re: [PATCH v3 1/8] xenalyze: add to tools/xentrace/ Date: Fri, 22 May 2015 12:25:32 +0100 Message-ID: <20150522112532.GM19083@zion.uk.xensource.com> References: <1432282779-7804-1-git-send-email-olaf@aepfle.de> <1432282779-7804-2-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1432282779-7804-2-git-send-email-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: Wei Liu , Ian Campbell , Stefano Stabellini , George Dunlap , Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, May 22, 2015 at 08:19:32AM +0000, Olaf Hering wrote: > This merges xenalyze.hg, changeset 150:24308507be1d, > into tools/xentrace/xenalyze.c to have the tool and > public/trace.h in one place. > > Signed-off-by: Olaf Hering > Cc: Ian Jackson > Cc: Stefano Stabellini > Cc: Ian Campbell > Cc: Wei Liu > --- > .gitignore | 1 + > tools/xentrace/Makefile | 9 +- > tools/xentrace/analyze.h | 107 + > tools/xentrace/mread.c | 160 + > tools/xentrace/mread.h | 18 + > tools/xentrace/pv.h | 41 + > tools/xentrace/xenalyze.c | 10407 ++++++++++++++++++++++++++++++++++++++++++++ > 7 files changed, 10742 insertions(+), 1 deletion(-) > > diff --git a/.gitignore b/.gitignore > index 3bc9cd9..3f42ded 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -173,6 +173,7 @@ tools/misc/gtracestat > tools/misc/xenlockprof > tools/misc/lowmemd > tools/misc/xencov > +tools/xentrace/xenalyze > tools/pygrub/build/* > tools/python/build/* > tools/security/secpol_tool > diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile > index 8b80541..57691af 100644 > --- a/tools/xentrace/Makefile > +++ b/tools/xentrace/Makefile > @@ -7,6 +7,7 @@ CFLAGS += $(CFLAGS_libxenctrl) > LDLIBS += $(LDLIBS_libxenctrl) > > BIN = xentrace xentrace_setsize > +SBIN = xenalyze Why is xenalyze not placed in the same directory as xentrace? My impression is that they are closely related. What did I miss? And given that xenalyze only analyse the log it shouldn't require privilege to run so it should be placed in BIN? > LIBBIN = xenctx > SCRIPTS = xentrace_format > MAN1 = $(wildcard *.1) > @@ -16,15 +17,17 @@ MAN8 = $(wildcard *.8) > all: build > > .PHONY: build > -build: $(BIN) $(LIBBIN) > +build: $(BIN) $(SBIN) $(LIBBIN) > > .PHONY: install > install: build > $(INSTALL_DIR) $(DESTDIR)$(bindir) > + $(INSTALL_DIR) $(DESTDIR)$(sbindir) > [ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) > $(INSTALL_DIR) $(DESTDIR)$(MAN1DIR) > $(INSTALL_DIR) $(DESTDIR)$(MAN8DIR) > $(INSTALL_PROG) $(BIN) $(DESTDIR)$(bindir) > + $(INSTALL_PROG) $(SBIN) $(DESTDIR)$(sbindir) > $(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(bindir) > [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN) > $(INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR) And of course if it is placed under BIN you won't need the above hunk anymore. Wei. > @@ -46,5 +49,9 @@ xenctx: xenctx.o > xentrace_setsize: setsize.o > $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS) $(APPEND_LDFLAGS) > > +xenalyze.o: CFLAGS += -I$(XEN_ROOT)/xen/include > +xenalyze: xenalyze.o mread.o > + $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS) > + > -include $(DEPS) >