diff options
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | Makefile.in | 194 | ||||
-rw-r--r-- | aclocal.m4 | 458 | ||||
-rwxr-xr-x | configure | 5 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | lket.5.in | 15 | ||||
-rw-r--r-- | runtime/ChangeLog | 11 | ||||
-rw-r--r-- | runtime/lket/b2a/Makefile.am | 6 | ||||
-rw-r--r-- | runtime/lket/b2a/Makefile.in | 425 | ||||
-rw-r--r-- | runtime/lket/b2a/README | 48 | ||||
-rw-r--r-- | runtime/lket/b2a/lket_b2a.c | 562 | ||||
-rw-r--r-- | runtime/lket/b2a/lket_b2a.h | 96 |
13 files changed, 1657 insertions, 183 deletions
@@ -1,3 +1,12 @@ +2006-05-24 Li Guanglei <guanglei@cn.ibm.com> + + * configure.ac: add lket.5 & runtime/lket/b2a + * Makefile.am: add lket & runtime/lket/b2a + * aclocal.m4, Makefile.in, configure: regenerated + * runtime/lket/b2a/*: a binary to ascii converter used + to convert LKET's default binary trace data. + * lket.5.in: add intro of lket-b2a converter. + 2006-05-23 David Smith <dsmith@redhat.com> * parse.cxx (parse_for_loop): Corrected error message. @@ -183,11 +192,6 @@ * buildrun.cxx: generate stpd_cmd to stop merge per-cpu files if -M option is turned on by stap. -2006-05-09 Li Guanglei <guanglei@cn.ibm.com> - PR 2647 - Patch given by Gui Jian <guij@cn.ibm.com> - * runtime/vsprintf.c: %0s support to print null-terminated string - 2006-05-08 Li Guanglei <guanglei@cn.ibm.com> PR 2627 * elaborate.cxx: epilogue style alias expansion diff --git a/Makefile.am b/Makefile.am index a551c524..39b68604 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,7 @@ AM_CFLAGS = -std=gnu99 -D_GNU_SOURCE -fexceptions \ -Wall -Werror -Wshadow -Wunused -Wformat=2 -W AM_CXXFLAGS = -Wall -dist_man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapex.5 +dist_man_MANS = stap.1 stapprobes.5 stapfuncs.5 stapex.5 lket.5 bin_PROGRAMS = stap stap_SOURCES = main.cxx \ parse.cxx staptree.cxx elaborate.cxx translate.cxx \ @@ -122,3 +122,5 @@ uninstall-local: rm -rf $(DESTDIR)$(pkgdatadir) rm -rf $(DESTDIR)$(libexecdir)/$(PACKAGE) -rm -rf $(DESTDIR)$(localstatedir)/cache/$(PACKAGE) + +SUBDIRS = runtime/lket/b2a diff --git a/Makefile.in b/Makefile.in index 9375e0cd..efee0104 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.9.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +17,8 @@ # Makefile.am --- automake input file for systemtap +SOURCES = $(loc2c_test_SOURCES) $(stap_SOURCES) $(stpd_SOURCES) + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -49,12 +51,12 @@ noinst_PROGRAMS = loc2c-test$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.in $(srcdir)/stap.1.in $(srcdir)/stapex.5.in \ - $(srcdir)/stapfuncs.5.in $(srcdir)/stapprobes.5.in \ - $(srcdir)/stp_check.in $(srcdir)/systemtap.spec.in \ - $(srcdir)/lket.5.in \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - compile depcomp install-sh missing + $(srcdir)/config.in $(srcdir)/lket.5.in $(srcdir)/stap.1.in \ + $(srcdir)/stapex.5.in $(srcdir)/stapfuncs.5.in \ + $(srcdir)/stapprobes.5.in $(srcdir)/stp_check.in \ + $(srcdir)/systemtap.spec.in $(top_srcdir)/configure AUTHORS \ + COPYING ChangeLog INSTALL NEWS compile depcomp install-sh \ + missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -63,8 +65,8 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = systemtap.spec stp_check stap.1 stapprobes.5 lket.5 \ - stapfuncs.5 stapex.5 +CONFIG_CLEAN_FILES = systemtap.spec stp_check stap.1 stapprobes.5 \ + stapfuncs.5 stapex.5 lket.5 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" \ "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(man5dir)" @@ -100,12 +102,19 @@ CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(loc2c_test_SOURCES) $(stap_SOURCES) $(stpd_SOURCES) DIST_SOURCES = $(loc2c_test_SOURCES) $(stap_SOURCES) $(stpd_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive man1dir = $(mandir)/man1 man5dir = $(mandir)/man5 NROFF = nroff MANS = $(dist_man_MANS) ETAGS = etags CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -254,8 +263,9 @@ XFAIL_TESTS = $(wildcard $(p)ko/*.stp) \ TESTS_ENVIRONMENT = $(srcdir)/runtest.sh TEST_COV_DIR = coverage +SUBDIRS = runtime/lket/b2a all: $(BUILT_SOURCES) config.h - $(MAKE) $(AM_MAKEFLAGS) all-am + $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .cxx .o .obj @@ -315,14 +325,14 @@ stp_check: $(top_builddir)/config.status $(srcdir)/stp_check.in cd $(top_builddir) && $(SHELL) ./config.status $@ stap.1: $(top_builddir)/config.status $(srcdir)/stap.1.in cd $(top_builddir) && $(SHELL) ./config.status $@ -lket.5: $(top_builddir)/config.status $(srcdir)/lket.5.in - cd $(top_builddir) && $(SHELL) ./config.status $@ stapprobes.5: $(top_builddir)/config.status $(srcdir)/stapprobes.5.in cd $(top_builddir) && $(SHELL) ./config.status $@ stapfuncs.5: $(top_builddir)/config.status $(srcdir)/stapfuncs.5.in cd $(top_builddir) && $(SHELL) ./config.status $@ stapex.5: $(top_builddir)/config.status $(srcdir)/stapex.5.in cd $(top_builddir) && $(SHELL) ./config.status $@ +lket.5: $(top_builddir)/config.status $(srcdir)/lket.5.in + cd $(top_builddir) && $(SHELL) ./config.status $@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @@ -707,6 +717,65 @@ uninstall-man5: rm -f "$(DESTDIR)$(man5dir)/$$inst"; \ done +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -717,10 +786,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -733,7 +815,7 @@ TAGS: $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ $$tags $$unique; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ @@ -858,6 +940,21 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook @@ -961,22 +1058,23 @@ distcleancheck: distclean check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am + $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) config.h -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -995,25 +1093,25 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) @BUILD_ELFUTILS_FALSE@install-exec-local: -clean: clean-am +clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-local \ clean-noinstPROGRAMS clean-pkglibexecPROGRAMS mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive -info: info-am +info: info-recursive info-am: @@ -1022,28 +1120,28 @@ install-data-am: install-data-local install-man install-exec-am: install-binPROGRAMS install-exec-local \ install-pkglibexecPROGRAMS install-pkglibexecSCRIPTS -install-info: install-info-am +install-info: install-info-recursive install-man: install-man1 install-man5 installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: @@ -1051,27 +1149,31 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-local \ uninstall-man uninstall-pkglibexecPROGRAMS \ uninstall-pkglibexecSCRIPTS +uninstall-info: uninstall-info-recursive + uninstall-man: uninstall-man1 uninstall-man5 -.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \ - clean clean-binPROGRAMS clean-generic clean-local \ - clean-noinstPROGRAMS clean-pkglibexecPROGRAMS ctags dist \ - dist-all dist-bzip2 dist-gzip dist-hook dist-shar dist-tarZ \ - dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-binPROGRAMS install-data \ +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-TESTS check-am clean clean-binPROGRAMS clean-generic \ + clean-local clean-noinstPROGRAMS clean-pkglibexecPROGRAMS \ + clean-recursive ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \ + distclean distclean-compile distclean-generic distclean-hdr \ + distclean-recursive distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ install-data-am install-data-local install-exec \ install-exec-am install-exec-local install-info \ install-info-am install-man install-man1 install-man5 \ install-pkglibexecPROGRAMS install-pkglibexecSCRIPTS \ install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-info-am uninstall-local uninstall-man uninstall-man1 \ - uninstall-man5 uninstall-pkglibexecPROGRAMS \ - uninstall-pkglibexecSCRIPTS + installdirs-am maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-info-am uninstall-local \ + uninstall-man uninstall-man1 uninstall-man5 \ + uninstall-pkglibexecPROGRAMS uninstall-pkglibexecSCRIPTS @BUILD_ELFUTILS_TRUE@stamp-elfutils: config.status @BUILD_ELFUTILS_TRUE@ $(MAKE) $(AM_MAKEFLAGS) -C build-elfutils all @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.9.2 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,11 +11,23 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# -*- Autoconf -*- +# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Generated from amversion.in; do not edit by hand. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- @@ -28,15 +40,26 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) + [AM_AUTOMAKE_VERSION([1.9.2])]) -# AM_AUX_DIR_EXPAND -*- Autoconf -*- +# AM_AUX_DIR_EXPAND -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to @@ -84,14 +107,25 @@ am_aux_dir=`cd $ac_aux_dir && pwd` ]) -# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005 +# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 4 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 # This was merged into AC_PROG_CC in Autoconf. @@ -106,16 +140,26 @@ am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc ]) AU_DEFUN([fp_PROG_CC_STDC]) -# AM_CONDITIONAL -*- Autoconf -*- +# AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. -# serial 7 +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 6 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -139,15 +183,26 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) +# serial 7 -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 8 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -156,6 +211,7 @@ fi])]) # CC etc. in the Makefile, will ask for an AC_PROG_CC use... + # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. @@ -295,16 +351,27 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) -# Generate code to set up dependency tracking. -*- Autoconf -*- +# Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. -#serial 3 +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +#serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ @@ -363,19 +430,30 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Do all the work for Automake. -*- Autoconf -*- +# Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# This macro actually does too much some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 12 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 11 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) @@ -477,27 +555,51 @@ for _am_header in $config_headers :; do done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# -*- Autoconf -*- +# Copyright (C) 2003 Free Software Foundation, Inc. -# serial 2 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. @@ -512,17 +614,28 @@ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# Add --enable-maintainer-mode option to configure. # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 4 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) @@ -541,15 +654,26 @@ AC_DEFUN([AM_MAINTAINER_MODE], AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) -# Check to see how 'make' treats includes. -*- Autoconf -*- +# Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -# serial 3 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 # AM_MAKE_INCLUDE() # ----------------- @@ -593,16 +717,27 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- +# -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 4 +# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -628,16 +763,27 @@ else fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# + +# Copyright (C) 2003, 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). @@ -691,15 +837,26 @@ else fi AC_SUBST([mkdir_p])]) -# Helper functions for option handling. -*- Autoconf -*- +# Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -# serial 3 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -724,14 +881,26 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005 + +# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 4 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 AC_DEFUN([AM_C_PROTOTYPES], [AC_REQUIRE([AC_C_PROTOTYPES]) @@ -749,16 +918,28 @@ AC_SUBST(ANSI2KNR)dnl AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. # -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Check to make sure that the build environment is sane. +# + +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. -# serial 4 +# serial 3 # AM_SANITY_CHECK # --------------- @@ -801,14 +982,25 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - # AM_PROG_INSTALL_STRIP -# --------------------- + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip @@ -831,13 +1023,25 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 -# serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- @@ -5205,7 +5205,7 @@ DATE="$date" ac_config_headers="$ac_config_headers config.h:config.in" - ac_config_files="$ac_config_files Makefile systemtap.spec stp_check stap.1 stapprobes.5 stapfuncs.5 stapex.5 lket.5" + ac_config_files="$ac_config_files Makefile systemtap.spec stp_check stap.1 stapprobes.5 stapfuncs.5 stapex.5 lket.5 runtime/lket/b2a/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -5788,10 +5788,11 @@ do "systemtap.spec" ) CONFIG_FILES="$CONFIG_FILES systemtap.spec" ;; "stp_check" ) CONFIG_FILES="$CONFIG_FILES stp_check" ;; "stap.1" ) CONFIG_FILES="$CONFIG_FILES stap.1" ;; - "lket.5" ) CONFIG_FILES="$CONFIG_FILES lket.5" ;; "stapprobes.5" ) CONFIG_FILES="$CONFIG_FILES stapprobes.5" ;; "stapfuncs.5" ) CONFIG_FILES="$CONFIG_FILES stapfuncs.5" ;; "stapex.5" ) CONFIG_FILES="$CONFIG_FILES stapex.5" ;; + "lket.5" ) CONFIG_FILES="$CONFIG_FILES lket.5" ;; + "runtime/lket/b2a/Makefile" ) CONFIG_FILES="$CONFIG_FILES runtime/lket/b2a/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 diff --git a/configure.ac b/configure.ac index fd6659d0..4769a7a8 100644 --- a/configure.ac +++ b/configure.ac @@ -53,7 +53,7 @@ AC_DEFINE_UNQUOTED(DATE, "$date", [Configuration/build date]) AC_SUBST(DATE, "$date") AC_CONFIG_HEADERS([config.h:config.in]) -AC_CONFIG_FILES(Makefile systemtap.spec stp_check stap.1 stapprobes.5 stapfuncs.5 stapex.5) +AC_CONFIG_FILES(Makefile systemtap.spec stp_check stap.1 stapprobes.5 stapfuncs.5 stapex.5 lket.5 runtime/lket/b2a/Makefile) AC_OUTPUT if test $build_elfutils = yes; then @@ -250,7 +250,20 @@ To get a better performance for binary tracing, the "-b" option should be turned on for stap and thus -M option has to be added to stop stpd merging per-cpu files. -If you want LKET to log trace data in ASCII format, you should: +You could use the command +.I lket-b2a +to convert the binary trace data +generated by LKET into readable data in ascii format. + +.I lket-b2a +uses the pre-cpu binary trace data files as inputs, and generates +an output file named +.I lket.out +You should use "stap -b -M" with LKET to get those pre-cpu files +(stpd_cpu*) before using it. + + +If you want LKET to log trace data in ASCII format directly, you should: .SAMPLE stap -D ASCII_TRACE ... .ESAMPLE diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 094fbe85..197ac448 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,14 @@ +2006-05-24 Li Guanglei <guanglei@cn.ibm.com> + * lket/b2a/Makefile.am, lket/b2a/Makefile.in, + lket/b2a/README, lket/b2a/lket_b2a.c, + lket/b2a/lket_b2a.h: a binary to ascii converter used + to convert LKET's default binary trace data. + +2006-05-09 Li Guanglei <guanglei@cn.ibm.com> + PR 2647 + Patch given by Gui Jian <guij@cn.ibm.com> + * vsprintf.c: %0s support to print null-terminated string + 2006-05-03 Josh Stone <joshua.i.stone@intel.com> * loc2c-runtime.h (deref_string): resolved gcc "warning: diff --git a/runtime/lket/b2a/Makefile.am b/runtime/lket/b2a/Makefile.am new file mode 100644 index 00000000..dc8dbd92 --- /dev/null +++ b/runtime/lket/b2a/Makefile.am @@ -0,0 +1,6 @@ +bin_PROGRAMS = lket-b2a +lket_b2a_SOURCES = lket_b2a.c +lket_b2a_DEPENDENCIES = lket_b2a.h +#b2a_LDADD = `pkg-config --libs glib-2.0` +lket_b2a_LDFLAGS = `pkg-config --libs glib-2.0` +lket_b2a_CFLAGS = -O2 -D_GNU_SOURCE -Wall `pkg-config --cflags glib-2.0` diff --git a/runtime/lket/b2a/Makefile.in b/runtime/lket/b2a/Makefile.in new file mode 100644 index 00000000..4ea748cb --- /dev/null +++ b/runtime/lket/b2a/Makefile.in @@ -0,0 +1,425 @@ +# Makefile.in generated by automake 1.9.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +SOURCES = $(lket_b2a_SOURCES) + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +bin_PROGRAMS = lket-b2a$(EXEEXT) +subdir = runtime/lket/b2a +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_lket_b2a_OBJECTS = lket_b2a-lket_b2a.$(OBJEXT) +lket_b2a_OBJECTS = $(am_lket_b2a_OBJECTS) +lket_b2a_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(lket_b2a_SOURCES) +DIST_SOURCES = $(lket_b2a_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_ELFUTILS_FALSE = @BUILD_ELFUTILS_FALSE@ +BUILD_ELFUTILS_TRUE = @BUILD_ELFUTILS_TRUE@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATE = @DATE@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +U = @U@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +stap_LIBS = @stap_LIBS@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +lket_b2a_SOURCES = lket_b2a.c +lket_b2a_DEPENDENCIES = lket_b2a.h +#b2a_LDADD = `pkg-config --libs glib-2.0` +lket_b2a_LDFLAGS = `pkg-config --libs glib-2.0` +lket_b2a_CFLAGS = -O2 -D_GNU_SOURCE -Wall `pkg-config --cflags glib-2.0` +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu runtime/lket/b2a/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu runtime/lket/b2a/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) +lket-b2a$(EXEEXT): $(lket_b2a_OBJECTS) $(lket_b2a_DEPENDENCIES) + @rm -f lket-b2a$(EXEEXT) + $(LINK) $(lket_b2a_LDFLAGS) $(lket_b2a_OBJECTS) $(lket_b2a_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lket_b2a-lket_b2a.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +lket_b2a-lket_b2a.o: lket_b2a.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lket_b2a_CFLAGS) $(CFLAGS) -MT lket_b2a-lket_b2a.o -MD -MP -MF "$(DEPDIR)/lket_b2a-lket_b2a.Tpo" -c -o lket_b2a-lket_b2a.o `test -f 'lket_b2a.c' || echo '$(srcdir)/'`lket_b2a.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lket_b2a-lket_b2a.Tpo" "$(DEPDIR)/lket_b2a-lket_b2a.Po"; else rm -f "$(DEPDIR)/lket_b2a-lket_b2a.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lket_b2a.c' object='lket_b2a-lket_b2a.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lket_b2a_CFLAGS) $(CFLAGS) -c -o lket_b2a-lket_b2a.o `test -f 'lket_b2a.c' || echo '$(srcdir)/'`lket_b2a.c + +lket_b2a-lket_b2a.obj: lket_b2a.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lket_b2a_CFLAGS) $(CFLAGS) -MT lket_b2a-lket_b2a.obj -MD -MP -MF "$(DEPDIR)/lket_b2a-lket_b2a.Tpo" -c -o lket_b2a-lket_b2a.obj `if test -f 'lket_b2a.c'; then $(CYGPATH_W) 'lket_b2a.c'; else $(CYGPATH_W) '$(srcdir)/lket_b2a.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/lket_b2a-lket_b2a.Tpo" "$(DEPDIR)/lket_b2a-lket_b2a.Po"; else rm -f "$(DEPDIR)/lket_b2a-lket_b2a.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lket_b2a.c' object='lket_b2a-lket_b2a.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lket_b2a_CFLAGS) $(CFLAGS) -c -o lket_b2a-lket_b2a.obj `if test -f 'lket_b2a.c'; then $(CYGPATH_W) 'lket_b2a.c'; else $(CYGPATH_W) '$(srcdir)/lket_b2a.c'; fi` +uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: install-binPROGRAMS + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic ctags distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/runtime/lket/b2a/README b/runtime/lket/b2a/README new file mode 100644 index 00000000..004cc640 --- /dev/null +++ b/runtime/lket/b2a/README @@ -0,0 +1,48 @@ +b2a: a binary2ascii converter for LKET + +It is used to convert the binary trace data generated by systemtap +with LKET into readable data in ascii format. + +It uses the pre-cpu binary trace data files as inputs, and generates +an output file named "lket.out". You can use "stap -b -M" with LKET +to get those pre-cpu files (stpd_cpu*) before using it. + +How to build: + gcc -O2 -o b2a lket_b2a.c + +How to use: + ./b2a stpd_cpuX [stpd_cpuY ...] + or + ./b2a stpd_cpu* + +The following is a typical output of b2a: + +LKET Magic: 0xAEFCDB6B +InitHdrLen: 4 +Version Major: 0 +Version Minor: 1 +Big endian: YES +Bits width: 2 +0.0 App1[PID:24456 PPID:24371 TID:24456] CPU:3 HOOKGRP:2 HOOKID:1 HOOKDATA:0 swapper +0.3 App1[PID:24456 PPID:24371 TID:24456] CPU:3 HOOKGRP:2 HOOKID:1 HOOKDATA:1 init +... +0.723810 App9[PID:3345 PPID:1 TID:3345] CPU:7 HOOKGRP:1 HOOKID:1 HOOKDATA:sys_gettimeofday +0.723814 App9[PID:3345 PPID:1 TID:3345] CPU:7 HOOKGRP:1 HOOKID:2 HOOKDATA:sys_gettimeofday +0.723820 App9[PID:3345 PPID:1 TID:3345] CPU:7 HOOKGRP:1 HOOKID:1 HOOKDATA:sys_poll +0.723837 App9[PID:3345 PPID:1 TID:3345] CPU:7 HOOKGRP:4 HOOKID:2 HOOKDATA:3345 c0000000004418c4 c000000007400040 c0000000004418b4 c0000000004433cc c0000000000cce80 c00000000002a408 80d0b2154c 80d2da7b40 +... +36.365564 App35[PID:24491 PPID:18767 TID:24491] CPU:3 HOOKGRP:6 HOOKID:1 HOOKDATA:268585192 0 +36.365571 App35[PID:24491 PPID:18767 TID:24491] CPU:3 HOOKGRP:1 HOOKID:1 HOOKDATA:compat_sys_execve +36.365579 App35[PID:24491 PPID:18767 TID:24491] CPU:3 HOOKGRP:2 HOOKID:2 HOOKDATA:/bin/ls +... +37.495705 App35[PID:24491 PPID:18767 TID:24491] CPU:4 HOOKGRP:1 HOOKID:1 HOOKDATA:sys_getdents64 +37.495730 App35[PID:24491 PPID:18767 TID:24491] CPU:4 HOOKGRP:3 HOOKID:2 HOOKDATA:anticipatory 8 0 +37.495738 App35[PID:24491 PPID:18767 TID:24491] CPU:4 HOOKGRP:3 HOOKID:1 HOOKDATA:anticipatory -1 -1 +37.495769 App35[PID:24491 PPID:18767 TID:24491] CPU:4 HOOKGRP:5 HOOKID:1 HOOKDATA:8 0 2 c0000000002fd8dc c000000002a52d48 c0000000001f160c +37.495775 App35[PID:24491 PPID:18767 TID:24491] CPU:4 HOOKGRP:5 HOOKID:1 HOOKDATA:8 0 2 +37.495784 App35[PID:24491 PPID:18767 TID:24491] CPU:4 HOOKGRP:5 HOOKID:2 HOOKDATA:2 1 2 -4611686018331225216 4096 45812 +... +37.516707 App32[PID:18763 PPID:3079 TID:18763] CPU:5 HOOKGRP:7 HOOKID:2 HOOKDATA:eth0 106 2048 1880 +... +37.517938 App4[PID:0 PPID:1 TID:0] CPU:1 HOOKGRP:7 HOOKID:1 HOOKDATA:eth0 46 2048 728 +... diff --git a/runtime/lket/b2a/lket_b2a.c b/runtime/lket/b2a/lket_b2a.c new file mode 100644 index 00000000..0aa0124b --- /dev/null +++ b/runtime/lket/b2a/lket_b2a.c @@ -0,0 +1,562 @@ +// Copyright (C) 2005, 2006 IBM Corp. +// +// This file is part of systemtap, and is free software. You can +// redistribute it and/or modify it under the terms of the GNU General +// Public License (GPL); either version 2, or (at your option) any +// later version. + +#include <sys/types.h> +#include <sys/time.h> +#include <sys/stat.h> +#include <ctype.h> +#include <assert.h> +#include <errno.h> +#include <unistd.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "lket_b2a.h" + +static long long start_timestamp; + +/* mapping table for [group, id, fmt] */ +int **groups[MAX_HOOKGROUP+1] = {NULL}; + +/* Balanced binary search tree to store the + mapping of <pid, process name> */ +GTree *appNameTree; + +/* + * default hook format table, + * based on tapsets/hookid_defs.stp and other hook specific files + */ +static hook_fmt default_hook_fmts[] = { + //_GROUP_SYSCALL + {1, 1, "%s"}, //HOOKID_SYSCALL_ENTRY + {1, 2, "%s"}, //HOOKID_SYSCALL_RETURN + //_GROUP_PROCESS + {2, 1, "%4b%s"},//HOOKID_PROCESS_SNAPSHOT + {2, 2, "%s"}, //HOOKID_PROCESS_EXECVE + {2, 3, "%4b"}, //HOOKID_PROCESS_FORK + //_GROUP_IOSCHED + {3, 1, "%s%1b%1b"}, //HOOKID_IOSCHED_NEXT_REQ + {3, 2, "%s%1b%1b"}, //HOOKID_IOSCHED_ADD_REQ + {3, 3, "%s%1b%1b"}, //HOOKID_IOSCHED_REMOVE_REQ + //_GROUP_TASK + {4, 1, "%4b%4b%1b"},//HOOKID_TASK_CTXSWITCH + {4, 2, "%4b"}, //HOOKID_TASK_CPUIDLE + //_GROUP_SCSI + {5, 1, "%1b%1b%1b"}, //HOOKID_SCSI_IOENTRY + {5, 2, "%1b%4b%1b%8b%4b%8b"}, //HOOKID_SCSI_IO_TO_LLD + {5, 3, "%4b%1b%8b"}, //HOOKID_SCSI_IODONE_BY_LLD + {5, 4, "%4b%1b%8b%4b"}, //HOOKID_SCSI_IOCOMP_BY_MIDLEVEL + //_GROUP_PAGEFAULT + {6, 1, "%8b%1b"}, //HOOKID_PAGEFAULT + //_GROUP_NETDEV + {7, 1, "%s%4b%2b%4b"}, //HOOKID_NETDEV_RECEIVE + {7, 2, "%s%4b%2b%4b"} //HOOKID_NETDEV_TRANSMIT +}; + +int main(int argc, char *argv[]) +{ + lket_pkt_header *hdrs = NULL; + FILE **infps = NULL; + FILE *outfp = NULL; + char outfilename[MAX_STRINGLEN]={0}; + int i, j, total_infiles = 0; + long long min; + + if(argc < 2) { + printf("Usage: %s inputfile1 [inputfile2...]\n", argv[0]); + return 1; + } + total_infiles = argc - 1; + + // open the input files and the output file + infps = (FILE **)malloc(total_infiles * sizeof(FILE *)); + if(!infps) { + printf("Unable to malloc infps\n"); + return 1; + } + memset(infps, 0, total_infiles * sizeof(FILE *)); + for(i=0; i < total_infiles; i++) { + infps[i] = fopen(argv[i+1], "r"); + if(infps[i] == NULL) { + printf("Unable to open %s\n", argv[i+1]); + goto failed; + } + } + + if(strnlen(outfilename, MAX_STRINGLEN) == 0) + strncpy(outfilename, DEFAULT_OUTFILE_NAME, MAX_STRINGLEN); + outfp = fopen(outfilename, "w"); + if(outfp == NULL) { + printf("Unable to create %s\n", outfilename); + goto failed; + } + + /* create the search tree */ + appNameTree = g_tree_new_full(compareFunc, NULL, NULL, destroyAppName); + + // register all hookdata formats here + register_formats(); + + // find the lket header + find_init_header(infps, total_infiles, outfp); + + // allocate packet headers array + hdrs = malloc(total_infiles * sizeof(lket_pkt_header)); + if(!hdrs) { + printf("Unable to malloc hdrs \n"); + goto failed; + } + memset(hdrs, 0, total_infiles * sizeof(lket_pkt_header)); + + // initialize packet headers array + start_timestamp = 0; + j = 0; + for(i=0; i < total_infiles; i++) { + get_pkt_header(infps[i], &hdrs[i]); + if((hdrs[i].sec*1000000LL + hdrs[i].usec) < start_timestamp + || (start_timestamp == 0)) { + start_timestamp = hdrs[i].sec*1000000LL + hdrs[i].usec; + j = i; + } + } + + // main loop of parsing & merging + min = start_timestamp; + do { + // j is the next + if(min) { + print_pkt_header(outfp, &hdrs[j]); + + if(hdrs[j].hookgroup==2 && + (hdrs[j].hookid==1 || hdrs[j].hookid==2)) + register_appname(j, infps[j], &hdrs[j]); + + // write the remaining content from infd[j] to outfile + b2a_vsnprintf(get_fmt(hdrs[j].hookgroup, hdrs[j].hookid), + infps[j], outfp, hdrs[j].size); + // update hdr[j] + get_pkt_header(infps[j], &hdrs[j]); + } + // recalculate the smallest timestamp + min = hdrs[0].sec*1000000LL + hdrs[0].usec; + j = 0; + for(i=1; i < total_infiles ; i++) { + if((min == 0) || + ((hdrs[i].sec*1000000LL + hdrs[i].usec) < min)) { + min = hdrs[i].sec*1000000LL + hdrs[i].usec; + j = i; + } + } + } while(min != 0); + +failed: + // close all opened files + for(i=0; i < total_infiles; i++) + if(infps[i]) + fclose(infps[i]); + if(outfp) + fclose(outfp); + + // free all allocated memory space + for(i=0; i <= MAX_HOOKGROUP; i++) { + if(groups[i]) { + for(j=0; j <= MAX_HOOKID; j++) + if(groups[i][j]) { + free(groups[i][j]); + groups[i][j] = NULL; + } + } + } + if(infps) + free(infps); + if(hdrs) + free(hdrs); + + g_tree_destroy(appNameTree); + + return 0; +} + +/* register newly found process name for addevent.process.snapshot + and addevent.process.execve */ +void register_appname(int i, FILE *fp, lket_pkt_header *phdr) +{ + int pid; + char *appname; + int count; + int len; + int c; + len=0; + count=0; + + appname = (char *)malloc(1024); + + if(phdr->hookid ==1 ) { /* process_snapshot */ + len = fread(&pid, 1, 4, fp); + c = fgetc_unlocked(fp); + ++len; + while (c && len < 1024) { + appname[count++] = (char)c; + c = fgetc_unlocked(fp); + ++len; + } + appname[count]='\0'; + fseek(fp, 0-len, SEEK_CUR); + } else if (phdr->hookid == 2) { /* process.execve */ + pid = phdr->pid; + + c = fgetc_unlocked(fp); + ++len; + while (c && len < 1024) { + appname[count++] = (char)c; + c = fgetc_unlocked(fp); + ++len; + } + appname[count]='\0'; + fseek(fp, 0-len, SEEK_CUR); + } else { + free(appname); + return; + } + g_tree_insert(appNameTree, (gpointer)pid, (gpointer)appname); +} + + +gint compareFunc(gconstpointer a, gconstpointer b, gpointer user_data) +{ + if((int)(a) > (int)(b)) return 1; + else if ((int)(a) < (int)(b)) return -1; + else return 0; +} + +void destroyAppName(gpointer data) +{ + free(data); +} + +/* The following are all supporting sub-functions */ + +/* + * register one hookdata fmt string for a [hookgroup, hookid] pair + */ +int register_one_fmt(int hookgroup, int hookid, const char *fmt, size_t maxlen) +{ + void *ptr; + + if(hookgroup < 0 || hookgroup > MAX_HOOKGROUP) + return -1; + if(hookid < 0 || hookid > MAX_HOOKID) + return -1; + if(!fmt || maxlen <= 0) + return -1; + if(groups[hookgroup] == NULL) { + // allocate hook aray for new group + ptr = malloc((MAX_HOOKID+1) * sizeof(char *)); + if(!ptr) + return -1; + memset(ptr,0,(MAX_HOOKID+1) * sizeof(char *)); + groups[hookgroup] = ptr; + } + if(groups[hookgroup][hookid] != NULL) { + free(groups[hookgroup][hookid]); + groups[hookgroup][hookid] = NULL; + } + assert(groups[hookgroup][hookid] == NULL); + ptr = malloc(maxlen); + if(!ptr) + return -1; + memset(ptr, 0, maxlen); + strncpy(ptr, fmt, maxlen); + groups[hookgroup][hookid] = ptr; + return 0; +} + +/* + * initialize all the hookdata fmt strings as required + * called at the beginning of main() + */ +void register_formats(void) +{ + int i, total; + + total = sizeof(default_hook_fmts)/sizeof(default_hook_fmts[0]); + if(total <= 0) + return; + for(i=0; i<total; i++) + register_one_fmt( default_hook_fmts[i].hookgrp, + default_hook_fmts[i].hookid, + default_hook_fmts[i].fmt, + strlen(default_hook_fmts[i].fmt) + 1 ); +} + +/* + * get the format string with [hookgroup, hookid] pair + */ +const char *get_fmt(int hookgroup, int hookid) +{ + assert(hookgroup >= 0 && hookgroup <= MAX_HOOKGROUP ); + assert(hookid >= 0 && hookid <= MAX_HOOKID ); + if(groups[hookgroup] && groups[hookgroup][hookid]) + return (const char *)groups[hookgroup][hookid]; + else + return "<Bad Fmt>"; +} + +/* + * handle the bothering sequence id generated by systemtap + */ +int skip_sequence_id(FILE *fp) +{ + return (fseek(fp, (off_t)SEQID_SIZE, SEEK_CUR) == -1); +} + +/* + * search the LKET init header in a set of input files, + * and the header structure is defined in tapsets/lket_trace.stp + */ +void find_init_header(FILE **infps, const int total_infiles, FILE *outfp) +{ + int i, j; + int32_t magic; + + /* information from lket_init_header */ + int16_t inithdr_len; + int8_t ver_major; + int8_t ver_minor; + int8_t big_endian; + int8_t bits_width; + + if(total_infiles <= 0 ) + return; + j = total_infiles; + for(i=0; i<total_infiles; i++) { + if(skip_sequence_id(infps[i])) + continue; + if(fread(&magic, 1, sizeof(magic), infps[i]) < sizeof(magic)) + continue; + if(magic == (int32_t)LKET_MAGIC) { + //found + j = i; + fprintf(outfp, "LKET Magic:\t0x%X\n", magic); + //read other content of lket_int_header + if(fread(&inithdr_len, 1, sizeof(inithdr_len), infps[i]) < sizeof(inithdr_len)) + break; + fprintf(outfp, "InitHdrLen:\t%d\n", inithdr_len); + if(fread(&ver_major, 1, sizeof(ver_major), infps[i]) < sizeof(ver_major)) + break; + fprintf(outfp, "Version Major:\t%d\n", ver_major); + if(fread(&ver_minor, 1, sizeof(ver_minor), infps[i]) < sizeof(ver_minor)) + break; + fprintf(outfp, "Version Minor:\t%d\n", ver_minor); + if(fread(&big_endian, 1, sizeof(big_endian), infps[i]) < sizeof(big_endian)) + break; + fprintf(outfp, "Big endian:\t%s\n", big_endian ? "YES":"NO"); + if(fread(&bits_width, 1, sizeof(bits_width), infps[i]) < sizeof(bits_width)) + break; + fprintf(outfp, "Bits width:\t%d\n", bits_width); + // skip the null terminater + fseek(infps[i], 1LL, SEEK_CUR); + break; + } + } + for(i=0; i<total_infiles && i!=j; i++) + fseek(infps[i], 0LL, SEEK_SET); + return; +} + +/* + * read the lket_pkt_header structure at the begining of the input file + */ +int get_pkt_header(FILE *fp, lket_pkt_header *phdr) +{ + if(skip_sequence_id(fp)) + goto bad; + + if(fread(phdr, 1, sizeof(lket_pkt_header), fp) < sizeof(lket_pkt_header)) + goto bad; + + phdr->size -= sizeof(lket_pkt_header)-sizeof(phdr->flag)-sizeof(phdr->size)-1; + + return 0; + +bad: + memset(phdr, 0, sizeof(lket_pkt_header)); + return -1; +} + +/* + * print the lket_pkt_header structure into the output file + */ +void print_pkt_header(FILE *fp, lket_pkt_header *phdr) +{ + if(!fp || !phdr) + return; + fprintf(fp, "%lld.%lld APPNAME: %s PID:%d PPID:%d TID:%d CPU:%d HOOKGRP:%d HOOKID:%d HOOKDATA:", + (phdr->sec*1000000LL + phdr->usec - start_timestamp)/1000000LL, + (phdr->sec*1000000LL + phdr->usec- start_timestamp)%1000000LL, + (char *)(g_tree_lookup(appNameTree, (gconstpointer)phdr->pid)), + phdr->pid, + phdr->ppid, + phdr->tid, + phdr->cpu, + phdr->hookgroup, + phdr->hookid); +} +static int skip_atoi(const char **s) +{ + int i=0; + while (isdigit(**s)) + i = i*10 + *((*s)++) - '0'; + return i; +} + +/* + * read fixed-length from the input binary file and write into + * the output file, based on the fmt string + */ +void b2a_vsnprintf(const char *fmt, FILE *infp, FILE *outfile, size_t size) +{ + + int field_width, qualifier; + int readbytes = 0; + int c; + int16_t stemp; + int32_t ntemp; + long ltemp; + long long lltemp; + + if(size <= 0 || !outfile) + return; + + for(; *fmt; ++fmt) { + + if (*fmt != '%') { + if (readbytes < size) { + c = fgetc_unlocked(infp); + ++readbytes; + fputc_unlocked(*fmt, outfile); + continue; + } + goto filled; + } + + ++fmt; + qualifier = -1; + if (*fmt == 'l' || *fmt == 'L') { + qualifier = *fmt; + ++fmt; + if (qualifier == 'l' && *fmt == 'l') { + qualifier = 'L'; + ++fmt; + } + } + + field_width = -1; + if (isdigit(*fmt)) + field_width = skip_atoi(&fmt); + + switch (*fmt) { + case 's': + c = fgetc_unlocked(infp); + ++readbytes; + while (c && readbytes < size) { + fputc_unlocked(c, outfile); + c = fgetc_unlocked(infp); + ++readbytes; + } + if(!c) { + fputc_unlocked(' ', outfile); + continue; + } + else + goto filled; + case 'd': + case 'i': + if (qualifier == 'l') { + if(readbytes + sizeof(long) > size) + goto filled; + fread(<emp, sizeof(long), 1, infp); + readbytes += sizeof(long); + fprintf(outfile,"%ld ", (long)ltemp); + } + else if (qualifier == 'L') { + if(readbytes + sizeof(long long) > size) + goto filled; + fread(&lltemp, sizeof(long long), 1, infp); + readbytes += sizeof(long long); + fprintf(outfile,"%lld ", (long long)lltemp); + } + else { + if(readbytes + 4 > size) + goto filled; + fread(&ntemp, 4, 1, infp); + readbytes += 4; + fprintf(outfile,"%d ", (int32_t)ntemp); + } + break; + case 'b': + if(field_width != 1 && field_width != 2 + && field_width != 4 && field_width != 8) + field_width = 4; + if(readbytes + field_width > size) + goto filled; + + //read(infd, &temp, field_width); + switch(field_width) { + case 1: + c = fgetc_unlocked(infp); + fprintf(outfile, "%d ", (int8_t)c); + break; + case 2: + fread(&stemp, 2, 1, infp); + fprintf(outfile, "%d ", (int16_t)stemp); + break; + case 8: + fread(&lltemp, 8, 1, infp); + fprintf(outfile, "%lld ",(int64_t)lltemp); + break; + case 4: + default: + fread(&ntemp, 4, 1, infp); + fprintf(outfile, "%d ", (int32_t)ntemp); + break; + } + readbytes += field_width; + break; + default: + if(readbytes >= size) + goto filled; + c = fgetc_unlocked(infp); + ++readbytes; + fputc_unlocked(c, outfile); + if (*fmt) { + if( readbytes >= size) + goto filled; + c = fgetc_unlocked(infp); + ++readbytes; + fputc_unlocked(c, outfile); + } else { + --fmt; + } + continue; + } + } + +filled: + // print possible backtrace string + while(readbytes++ < size ) { + if((c=fgetc_unlocked(infp)) != EOF) + break; + if(!c) + break; + fputc_unlocked(c, outfile); + } + if(readbytes < size) + fseek(infp, size - readbytes, SEEK_CUR); + fprintf(outfile, "\n"); +} diff --git a/runtime/lket/b2a/lket_b2a.h b/runtime/lket/b2a/lket_b2a.h new file mode 100644 index 00000000..dd239126 --- /dev/null +++ b/runtime/lket/b2a/lket_b2a.h @@ -0,0 +1,96 @@ +#ifndef _LKET_B2A_H +#define _LKET_B2A_H +#include <glib.h> + +#define LKET_MAGIC 0xAEFCDB6B + +#define MAX_STRINGLEN 256 +#define MAX_HOOKGROUP 255 +#define MAX_HOOKID 255 + +#define APPNAMELIST_LEN 256 + +#define SEQID_SIZE 4 + +#define DEFAULT_OUTFILE_NAME "lket.out" + +typedef struct _lket_pkt_header { + int8_t flag; + int16_t size; + int8_t hookgroup; + int8_t hookid; + int32_t sec; + int32_t usec; + int32_t pid; + int32_t ppid; + int32_t tid; + int8_t cpu; +} __attribute__((packed)) lket_pkt_header; + +typedef struct _appname_info { + int pid; + int ppid; + int tid; + long index; + struct _appname_info *next; +} appname_info; + +typedef struct _hook_fmt { + int hookgrp; + int hookid; + const char *fmt; +} hook_fmt; + +/* + * register one hookdata fmt string for a [hookgroup, hookid] pair + */ +static int register_one_fmt(int hookgroup, int hookid, const char *fmt, size_t maxlen); + +/* + * initialize all the hookdata fmt strings as required + * called at the beginning of main() + */ +static void register_formats(void); + +/* + * get the format string with [hookgroup, hookid] pair + */ +static const char *get_fmt(int hookgroup, int hookid); + +/* + * handle the bothering sequence id generated by systemtap + */ +static int skip_sequence_id(FILE *fp); + +/* + * search the lket_init_header structure in a set of input files + */ +static void find_init_header(FILE **fp, const int total_infiles, FILE *outfp); + +/* + * read the lket_pkt_header structure at the begining of the input file + */ +static int get_pkt_header(FILE *fp, lket_pkt_header *phdr); + +/* + * print the lket_pkt_header structure into the output file + */ +static void print_pkt_header(FILE *fp, lket_pkt_header *phdr); + +/* + * Get the appropriate appname index based on the [pid, ppid, tid] triple + * If exists, return it; otherwise, assigned a new one. + */ +//static long appname_index(int pid, int ppid, int tid); + +/* + * read fixed-length from the input binary file and write into + * the output file, based on the fmt string + */ +static void b2a_vsnprintf(const char *fmt, FILE *infp, FILE *outfile, size_t size); + +void register_appname(int i, FILE *fp, lket_pkt_header *phdr); +gint compareFunc(gconstpointer a, gconstpointer b, gpointer user_data); +void destroyAppName(gpointer data); + +#endif |