All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
	Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>,
	Maneesh Soni <maneesh@in.ibm.com>,
	Michael Mueller <mimu@de.ibm.com>,
	Reinhard Buendgen <BEUNDGEN@de.ibm.com>
Subject: [Qemu-devel] [patch 3/3] QEMU-C-F: qemu-core-filter documentation
Date: Tue, 22 Jun 2010 09:32:06 +0530	[thread overview]
Message-ID: <20100622040206.GD27051@in.ibm.com> (raw)
In-Reply-To: 20100622040018.044362998@mars.in.ibm.com

[-- Attachment #1: core-filter-docs.patch --]
[-- Type: text/plain, Size: 5310 bytes --]

Introduce documentation for qemu-core-filter in .texi format and update
Makefile to generate man page. Modified qemu-doc.texi to include documentation
for qemu-core-filter tool as a new chapter.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---

 Makefile              |   14 ++++++--
 qemu-core-filter.texi |   84 +++++++++++++++++++++++++++++++++++++++++++++++++
 qemu-doc.texi         |    6 ++++
 3 files changed, 101 insertions(+), 3 deletions(-)
 create mode 100644 qemu-core-filter.texi


diff --git a/Makefile b/Makefile
index 1174628..46f2873 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ $(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
 LIBS+=-lz $(LIBS_TOOLS)
 
 ifdef BUILD_DOCS
-DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt
+DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt qemu-core-filter.8
 else
 DOCS=
 endif
@@ -205,6 +205,7 @@ ifdef CONFIG_POSIX
 	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
 	$(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
+	$(INSTALL_DATA) qemu-core-filter.8 "$(DESTDIR)$(mandir)/man8"
 endif
 
 install-sysconfig:
@@ -290,6 +291,12 @@ qemu-nbd.8: qemu-nbd.texi
 	  pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
 	  "  GEN   $@")
 
+qemu-core-filter.8: qemu-core-filter.texi
+	$(call quiet-command, \
+	  perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-core-filter.pod && \
+	  pod2man --section=8 --center=" " --release=" \
+	  " qemu-core-filter.pod > $@, "  GEN   $@")
+
 dvi: qemu-doc.dvi qemu-tech.dvi
 html: qemu-doc.html qemu-tech.html
 info: qemu-doc.info qemu-tech.info
@@ -297,7 +304,7 @@ pdf: qemu-doc.pdf qemu-tech.pdf
 
 qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \
 	qemu-img.texi qemu-nbd.texi qemu-options.texi \
-	qemu-monitor.texi qemu-img-cmds.texi
+	qemu-monitor.texi qemu-img-cmds.texi qemu-core-filter.texi
 
 VERSION ?= $(shell cat VERSION)
 FILE = qemu-$(VERSION)
@@ -344,7 +351,8 @@ tarbin:
 	$(docdir)/qemu-tech.html \
 	$(mandir)/man1/qemu.1 \
 	$(mandir)/man1/qemu-img.1 \
-	$(mandir)/man8/qemu-nbd.8
+	$(mandir)/man8/qemu-nbd.8 \
+	$(mandir)/man8/qemu-core-filter.8
 
 # Include automatically generated dependency files
 -include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d)
diff --git a/qemu-core-filter.texi b/qemu-core-filter.texi
new file mode 100644
index 0000000..4253933
--- /dev/null
+++ b/qemu-core-filter.texi
@@ -0,0 +1,84 @@
+@example
+@c man begin SYNOPSIS
+usage: qemu-core-filter	[OPTION] @var{CORE} @var{DUMPFILE}
+@c man end
+@end example
+
+@c man begin DESCRIPTION
+When qemu[-kvm] application crashes it creats a huge coredump file that
+contains guest OS memory. qemu-core-filter creates a small @var{DUMPFILE} by
+excluding Guest OS memory pages using symbol information from qemu debuginfo.
+qemu-core-filter needs qemu[-kvm] debug information to locate guest OS memory.
+By default qemu-core-filter searches qemu[-kvm] debuginfo file in global debug
+directory named @b{/usr/lib/debug} with the help of unique build-id from
+coredump file. The debug information can be taken from
+@b{/usr/lib/debug/usr/bin/qemu[-kvm].debug} file.
+
+@b{Example:}
+
+# qemu-core-filter core core.out
+
+@c man end
+
+@c man begin OPTIONS
+@table @option
+@item -s|--symbol @var{FILENAME}
+
+Specify a qemu debuginfo file that contains symbol table. By default
+(without @b{-s} option) qemu-core-filter looks for debuginfo file under
+@b{/usr/lib/debug} directory. Use this option if qemu-core-filter is unable to
+find debuginfo file or it is located in different directory other than global
+debug directory.
+
+@b{Example:}
+
+# qemu-core-filter -s /usr/lib/debug/usr/bin/qemu-kvm.debug core
+core.out
+
+@b{NOTE:}  For qemu-core-filter built with elfutils <= 0.137 (or without
+build-id support), it is user's resposiblity to provide matching/correct
+debuginfo file otherwise the tool will not produce expected results.
+
+@item -d
+Print debugging message.
+
+@item -f|--force
+Force overwrite of o/p @var{DUMPFILE} if already exists.
+
+@item @var{CORE}
+This is a pathname to the qemu coredump file.
+
+@item @var{DUMPFILE}
+This is a pathname to a file to be created by this command.
+
+@item -h
+Show help message.
+
+@end table
+
+@c man end
+
+@c man begin RETURN CODES
+
+qemu-core-filter returns 0 on success and no-zero value on failure.
+
+@c man end
+
+@ignore
+
+@setfilename qemu-core-filter
+@settitle filter out Guest OS memory from qemu coredump file.
+
+@c man begin AUTHOR
+IBM Corporation          http://www.ibm.com
+@c man end
+
+@node Copyright
+
+@section Copyright
+Licensed Materials  -    Property of IBM
+
+(C) Copyright IBM Corp.2010 All Rights Reserved
+@bye
+
+@end ignore
diff --git a/qemu-doc.texi b/qemu-doc.texi
index e2c8e56..0b228a0 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -37,6 +37,7 @@
 * QEMU System emulator for non PC targets::
 * QEMU User space emulator::
 * compilation:: Compilation from the sources
+* QEMU User space core filter tool::
 * License::
 * Index::
 @end menu
@@ -2536,6 +2537,11 @@ TODO
 
 @end table
 
+@node QEMU User space core filter tool
+@chapter QEMU User space core filter tool
+
+@include qemu-core-filter.texi
+
 @node License
 @appendix License
 

      parent reply	other threads:[~2010-06-22  4:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100622040018.044362998@mars.in.ibm.com>
2010-06-22  4:01 ` [Qemu-devel] [patch 1/3] QEMU-C-F: Bring up the elf.h header up-to-date with latest glibc elf.h header Mahesh Salgaonkar
2010-06-22  4:01 ` [Qemu-devel] [patch 2/3] QEMU-C-F: Introducing qemu userspace tool qemu-core-filter Mahesh Salgaonkar
2010-06-22 13:02   ` Anthony Liguori
2010-06-25 12:38     ` Mahesh Jagannath Salgaonkar
2010-06-22  4:02 ` Mahesh Salgaonkar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100622040206.GD27051@in.ibm.com \
    --to=mahesh@linux.vnet.ibm.com \
    --cc=BEUNDGEN@de.ibm.com \
    --cc=ananth@in.ibm.com \
    --cc=maneesh@in.ibm.com \
    --cc=mimu@de.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.