diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-30 06:38:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-30 07:52:44 -0400 |
commit | c1c2365acf8c044f749c0fe1ea236497e8d1718e (patch) | |
tree | 79f4f096429920ba67842f8adf0e57a35f5c14a0 /Documentation | |
parent | 7fbd55449aafb86d3237b5d1a26fb4dab2aa2c76 (diff) |
perf_counter tools: Generate per command manpages (and pdf/html, etc.)
Import Git's nice .txt => {man/html/pdf} generation machinery.
Fix various errors in the Documentation/perf*.txt description as well.
Also fix a bug in builtin-help: we'd map 'perf help top' to 'perftop'
if only the 'perf' binary is in the default PATH - confusing the manpage
logic. I dont fully understand why Git did it this way - but i suppose
it's a migration artifact from their migration from standalone git-xyz
commands to 'git xyz' commands. The perf tools were always using the
modern form so it's not an issue there.
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation')
14 files changed, 581 insertions, 27 deletions
diff --git a/Documentation/perf_counter/Documentation/Makefile b/Documentation/perf_counter/Documentation/Makefile new file mode 100644 index 000000000000..5457192e1b41 --- /dev/null +++ b/Documentation/perf_counter/Documentation/Makefile | |||
@@ -0,0 +1,300 @@ | |||
1 | MAN1_TXT= \ | ||
2 | $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \ | ||
3 | $(wildcard perf-*.txt)) \ | ||
4 | perf.txt | ||
5 | MAN5_TXT= | ||
6 | MAN7_TXT= | ||
7 | |||
8 | MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT) | ||
9 | MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT)) | ||
10 | MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT)) | ||
11 | |||
12 | DOC_HTML=$(MAN_HTML) | ||
13 | |||
14 | ARTICLES = | ||
15 | # with their own formatting rules. | ||
16 | SP_ARTICLES = | ||
17 | API_DOCS = $(patsubst %.txt,%,$(filter-out technical/api-index-skel.txt technical/api-index.txt, $(wildcard technical/api-*.txt))) | ||
18 | SP_ARTICLES += $(API_DOCS) | ||
19 | SP_ARTICLES += technical/api-index | ||
20 | |||
21 | DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES)) | ||
22 | |||
23 | DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT)) | ||
24 | DOC_MAN5=$(patsubst %.txt,%.5,$(MAN5_TXT)) | ||
25 | DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT)) | ||
26 | |||
27 | prefix?=$(HOME) | ||
28 | bindir?=$(prefix)/bin | ||
29 | htmldir?=$(prefix)/share/doc/perf-doc | ||
30 | pdfdir?=$(prefix)/share/doc/perf-doc | ||
31 | mandir?=$(prefix)/share/man | ||
32 | man1dir=$(mandir)/man1 | ||
33 | man5dir=$(mandir)/man5 | ||
34 | man7dir=$(mandir)/man7 | ||
35 | # DESTDIR= | ||
36 | |||
37 | ASCIIDOC=asciidoc | ||
38 | ASCIIDOC_EXTRA = | ||
39 | MANPAGE_XSL = manpage-normal.xsl | ||
40 | XMLTO_EXTRA = | ||
41 | INSTALL?=install | ||
42 | RM ?= rm -f | ||
43 | DOC_REF = origin/man | ||
44 | HTML_REF = origin/html | ||
45 | |||
46 | infodir?=$(prefix)/share/info | ||
47 | MAKEINFO=makeinfo | ||
48 | INSTALL_INFO=install-info | ||
49 | DOCBOOK2X_TEXI=docbook2x-texi | ||
50 | DBLATEX=dblatex | ||
51 | ifndef PERL_PATH | ||
52 | PERL_PATH = /usr/bin/perl | ||
53 | endif | ||
54 | |||
55 | -include ../config.mak.autogen | ||
56 | -include ../config.mak | ||
57 | |||
58 | # | ||
59 | # For asciidoc ... | ||
60 | # -7.1.2, no extra settings are needed. | ||
61 | # 8.0-, set ASCIIDOC8. | ||
62 | # | ||
63 | |||
64 | # | ||
65 | # For docbook-xsl ... | ||
66 | # -1.68.1, set ASCIIDOC_NO_ROFF? (based on changelog from 1.73.0) | ||
67 | # 1.69.0, no extra settings are needed? | ||
68 | # 1.69.1-1.71.0, set DOCBOOK_SUPPRESS_SP? | ||
69 | # 1.71.1, no extra settings are needed? | ||
70 | # 1.72.0, set DOCBOOK_XSL_172. | ||
71 | # 1.73.0-, set ASCIIDOC_NO_ROFF | ||
72 | # | ||
73 | |||
74 | # | ||
75 | # If you had been using DOCBOOK_XSL_172 in an attempt to get rid | ||
76 | # of 'the ".ft C" problem' in your generated manpages, and you | ||
77 | # instead ended up with weird characters around callouts, try | ||
78 | # using ASCIIDOC_NO_ROFF instead (it works fine with ASCIIDOC8). | ||
79 | # | ||
80 | |||
81 | ifdef ASCIIDOC8 | ||
82 | ASCIIDOC_EXTRA += -a asciidoc7compatible | ||
83 | endif | ||
84 | ifdef DOCBOOK_XSL_172 | ||
85 | ASCIIDOC_EXTRA += -a perf-asciidoc-no-roff | ||
86 | MANPAGE_XSL = manpage-1.72.xsl | ||
87 | else | ||
88 | ifdef ASCIIDOC_NO_ROFF | ||
89 | # docbook-xsl after 1.72 needs the regular XSL, but will not | ||
90 | # pass-thru raw roff codes from asciidoc.conf, so turn them off. | ||
91 | ASCIIDOC_EXTRA += -a perf-asciidoc-no-roff | ||
92 | endif | ||
93 | endif | ||
94 | ifdef MAN_BOLD_LITERAL | ||
95 | XMLTO_EXTRA += -m manpage-bold-literal.xsl | ||
96 | endif | ||
97 | ifdef DOCBOOK_SUPPRESS_SP | ||
98 | XMLTO_EXTRA += -m manpage-suppress-sp.xsl | ||
99 | endif | ||
100 | |||
101 | SHELL_PATH ?= $(SHELL) | ||
102 | # Shell quote; | ||
103 | SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) | ||
104 | |||
105 | # | ||
106 | # Please note that there is a minor bug in asciidoc. | ||
107 | # The version after 6.0.3 _will_ include the patch found here: | ||
108 | # http://marc.theaimsgroup.com/?l=perf&m=111558757202243&w=2 | ||
109 | # | ||
110 | # Until that version is released you may have to apply the patch | ||
111 | # yourself - yes, all 6 characters of it! | ||
112 | # | ||
113 | |||
114 | QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir | ||
115 | QUIET_SUBDIR1 = | ||
116 | |||
117 | ifneq ($(findstring $(MAKEFLAGS),w),w) | ||
118 | PRINT_DIR = --no-print-directory | ||
119 | else # "make -w" | ||
120 | NO_SUBDIR = : | ||
121 | endif | ||
122 | |||
123 | ifneq ($(findstring $(MAKEFLAGS),s),s) | ||
124 | ifndef V | ||
125 | QUIET_ASCIIDOC = @echo ' ' ASCIIDOC $@; | ||
126 | QUIET_XMLTO = @echo ' ' XMLTO $@; | ||
127 | QUIET_DB2TEXI = @echo ' ' DB2TEXI $@; | ||
128 | QUIET_MAKEINFO = @echo ' ' MAKEINFO $@; | ||
129 | QUIET_DBLATEX = @echo ' ' DBLATEX $@; | ||
130 | QUIET_XSLTPROC = @echo ' ' XSLTPROC $@; | ||
131 | QUIET_GEN = @echo ' ' GEN $@; | ||
132 | QUIET_STDERR = 2> /dev/null | ||
133 | QUIET_SUBDIR0 = +@subdir= | ||
134 | QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ | ||
135 | $(MAKE) $(PRINT_DIR) -C $$subdir | ||
136 | export V | ||
137 | endif | ||
138 | endif | ||
139 | |||
140 | all: html man | ||
141 | |||
142 | html: $(DOC_HTML) | ||
143 | |||
144 | $(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7): asciidoc.conf | ||
145 | |||
146 | man: man1 man5 man7 | ||
147 | man1: $(DOC_MAN1) | ||
148 | man5: $(DOC_MAN5) | ||
149 | man7: $(DOC_MAN7) | ||
150 | |||
151 | info: perf.info perfman.info | ||
152 | |||
153 | pdf: user-manual.pdf | ||
154 | |||
155 | install: install-man | ||
156 | |||
157 | install-man: man | ||
158 | $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) | ||
159 | # $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir) | ||
160 | # $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir) | ||
161 | $(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir) | ||
162 | # $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir) | ||
163 | # $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir) | ||
164 | |||
165 | install-info: info | ||
166 | $(INSTALL) -d -m 755 $(DESTDIR)$(infodir) | ||
167 | $(INSTALL) -m 644 perf.info perfman.info $(DESTDIR)$(infodir) | ||
168 | if test -r $(DESTDIR)$(infodir)/dir; then \ | ||
169 | $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) perf.info ;\ | ||
170 | $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) perfman.info ;\ | ||
171 | else \ | ||
172 | echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \ | ||
173 | fi | ||
174 | |||
175 | install-pdf: pdf | ||
176 | $(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir) | ||
177 | $(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir) | ||
178 | |||
179 | install-html: html | ||
180 | '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir) | ||
181 | |||
182 | ../PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE | ||
183 | $(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) PERF-VERSION-FILE | ||
184 | |||
185 | -include ../PERF-VERSION-FILE | ||
186 | |||
187 | # | ||
188 | # Determine "include::" file references in asciidoc files. | ||
189 | # | ||
190 | doc.dep : $(wildcard *.txt) build-docdep.perl | ||
191 | $(QUIET_GEN)$(RM) $@+ $@ && \ | ||
192 | $(PERL_PATH) ./build-docdep.perl >$@+ $(QUIET_STDERR) && \ | ||
193 | mv $@+ $@ | ||
194 | |||
195 | -include doc.dep | ||
196 | |||
197 | cmds_txt = cmds-ancillaryinterrogators.txt \ | ||
198 | cmds-ancillarymanipulators.txt \ | ||
199 | cmds-mainporcelain.txt \ | ||
200 | cmds-plumbinginterrogators.txt \ | ||
201 | cmds-plumbingmanipulators.txt \ | ||
202 | cmds-synchingrepositories.txt \ | ||
203 | cmds-synchelpers.txt \ | ||
204 | cmds-purehelpers.txt \ | ||
205 | cmds-foreignscminterface.txt | ||
206 | |||
207 | $(cmds_txt): cmd-list.made | ||
208 | |||
209 | cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT) | ||
210 | $(QUIET_GEN)$(RM) $@ && \ | ||
211 | $(PERL_PATH) ./cmd-list.perl ../command-list.txt $(QUIET_STDERR) && \ | ||
212 | date >$@ | ||
213 | |||
214 | clean: | ||
215 | $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7 | ||
216 | $(RM) *.texi *.texi+ *.texi++ perf.info perfman.info | ||
217 | $(RM) howto-index.txt howto/*.html doc.dep | ||
218 | $(RM) technical/api-*.html technical/api-index.txt | ||
219 | $(RM) $(cmds_txt) *.made | ||
220 | |||
221 | $(MAN_HTML): %.html : %.txt | ||
222 | $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ | ||
223 | $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \ | ||
224 | $(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \ | ||
225 | mv $@+ $@ | ||
226 | |||
227 | %.1 %.5 %.7 : %.xml | ||
228 | $(QUIET_XMLTO)$(RM) $@ && \ | ||
229 | xmlto -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< | ||
230 | |||
231 | %.xml : %.txt | ||
232 | $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ | ||
233 | $(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \ | ||
234 | $(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \ | ||
235 | mv $@+ $@ | ||
236 | |||
237 | XSLT = docbook.xsl | ||
238 | XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css | ||
239 | |||
240 | user-manual.html: user-manual.xml | ||
241 | $(QUIET_XSLTPROC)xsltproc $(XSLTOPTS) -o $@ $(XSLT) $< | ||
242 | |||
243 | perf.info: user-manual.texi | ||
244 | $(QUIET_MAKEINFO)$(MAKEINFO) --no-split -o $@ user-manual.texi | ||
245 | |||
246 | user-manual.texi: user-manual.xml | ||
247 | $(QUIET_DB2TEXI)$(RM) $@+ $@ && \ | ||
248 | $(DOCBOOK2X_TEXI) user-manual.xml --encoding=UTF-8 --to-stdout >$@++ && \ | ||
249 | $(PERL_PATH) fix-texi.perl <$@++ >$@+ && \ | ||
250 | rm $@++ && \ | ||
251 | mv $@+ $@ | ||
252 | |||
253 | user-manual.pdf: user-manual.xml | ||
254 | $(QUIET_DBLATEX)$(RM) $@+ $@ && \ | ||
255 | $(DBLATEX) -o $@+ -p /etc/asciidoc/dblatex/asciidoc-dblatex.xsl -s /etc/asciidoc/dblatex/asciidoc-dblatex.sty $< && \ | ||
256 | mv $@+ $@ | ||
257 | |||
258 | perfman.texi: $(MAN_XML) cat-texi.perl | ||
259 | $(QUIET_DB2TEXI)$(RM) $@+ $@ && \ | ||
260 | ($(foreach xml,$(MAN_XML),$(DOCBOOK2X_TEXI) --encoding=UTF-8 \ | ||
261 | --to-stdout $(xml) &&) true) > $@++ && \ | ||
262 | $(PERL_PATH) cat-texi.perl $@ <$@++ >$@+ && \ | ||
263 | rm $@++ && \ | ||
264 | mv $@+ $@ | ||
265 | |||
266 | perfman.info: perfman.texi | ||
267 | $(QUIET_MAKEINFO)$(MAKEINFO) --no-split --no-validate $*.texi | ||
268 | |||
269 | $(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml | ||
270 | $(QUIET_DB2TEXI)$(RM) $@+ $@ && \ | ||
271 | $(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@+ && \ | ||
272 | mv $@+ $@ | ||
273 | |||
274 | howto-index.txt: howto-index.sh $(wildcard howto/*.txt) | ||
275 | $(QUIET_GEN)$(RM) $@+ $@ && \ | ||
276 | '$(SHELL_PATH_SQ)' ./howto-index.sh $(wildcard howto/*.txt) >$@+ && \ | ||
277 | mv $@+ $@ | ||
278 | |||
279 | $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt | ||
280 | $(QUIET_ASCIIDOC)$(ASCIIDOC) -b xhtml11 $*.txt | ||
281 | |||
282 | WEBDOC_DEST = /pub/software/tools/perf/docs | ||
283 | |||
284 | $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt | ||
285 | $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \ | ||
286 | sed -e '1,/^$$/d' $< | $(ASCIIDOC) -b xhtml11 - >$@+ && \ | ||
287 | mv $@+ $@ | ||
288 | |||
289 | install-webdoc : html | ||
290 | '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST) | ||
291 | |||
292 | quick-install: quick-install-man | ||
293 | |||
294 | quick-install-man: | ||
295 | '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir) | ||
296 | |||
297 | quick-install-html: | ||
298 | '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir) | ||
299 | |||
300 | .PHONY: .FORCE-PERF-VERSION-FILE | ||
diff --git a/Documentation/perf_counter/Documentation/asciidoc.conf b/Documentation/perf_counter/Documentation/asciidoc.conf new file mode 100644 index 000000000000..356b23a40339 --- /dev/null +++ b/Documentation/perf_counter/Documentation/asciidoc.conf | |||
@@ -0,0 +1,91 @@ | |||
1 | ## linkperf: macro | ||
2 | # | ||
3 | # Usage: linkperf:command[manpage-section] | ||
4 | # | ||
5 | # Note, {0} is the manpage section, while {target} is the command. | ||
6 | # | ||
7 | # Show PERF link as: <command>(<section>); if section is defined, else just show | ||
8 | # the command. | ||
9 | |||
10 | [macros] | ||
11 | (?su)[\\]?(?P<name>linkperf):(?P<target>\S*?)\[(?P<attrlist>.*?)\]= | ||
12 | |||
13 | [attributes] | ||
14 | asterisk=* | ||
15 | plus=+ | ||
16 | caret=^ | ||
17 | startsb=[ | ||
18 | endsb=] | ||
19 | tilde=~ | ||
20 | |||
21 | ifdef::backend-docbook[] | ||
22 | [linkperf-inlinemacro] | ||
23 | {0%{target}} | ||
24 | {0#<citerefentry>} | ||
25 | {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>} | ||
26 | {0#</citerefentry>} | ||
27 | endif::backend-docbook[] | ||
28 | |||
29 | ifdef::backend-docbook[] | ||
30 | ifndef::perf-asciidoc-no-roff[] | ||
31 | # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this. | ||
32 | # v1.72 breaks with this because it replaces dots not in roff requests. | ||
33 | [listingblock] | ||
34 | <example><title>{title}</title> | ||
35 | <literallayout> | ||
36 | ifdef::doctype-manpage[] | ||
37 | .ft C | ||
38 | endif::doctype-manpage[] | ||
39 | | | ||
40 | ifdef::doctype-manpage[] | ||
41 | .ft | ||
42 | endif::doctype-manpage[] | ||
43 | </literallayout> | ||
44 | {title#}</example> | ||
45 | endif::perf-asciidoc-no-roff[] | ||
46 | |||
47 | ifdef::perf-asciidoc-no-roff[] | ||
48 | ifdef::doctype-manpage[] | ||
49 | # The following two small workarounds insert a simple paragraph after screen | ||
50 | [listingblock] | ||
51 | <example><title>{title}</title> | ||
52 | <literallayout> | ||
53 | | | ||
54 | </literallayout><simpara></simpara> | ||
55 | {title#}</example> | ||
56 | |||
57 | [verseblock] | ||
58 | <formalpara{id? id="{id}"}><title>{title}</title><para> | ||
59 | {title%}<literallayout{id? id="{id}"}> | ||
60 | {title#}<literallayout> | ||
61 | | | ||
62 | </literallayout> | ||
63 | {title#}</para></formalpara> | ||
64 | {title%}<simpara></simpara> | ||
65 | endif::doctype-manpage[] | ||
66 | endif::perf-asciidoc-no-roff[] | ||
67 | endif::backend-docbook[] | ||
68 | |||
69 | ifdef::doctype-manpage[] | ||
70 | ifdef::backend-docbook[] | ||
71 | [header] | ||
72 | template::[header-declarations] | ||
73 | <refentry> | ||
74 | <refmeta> | ||
75 | <refentrytitle>{mantitle}</refentrytitle> | ||
76 | <manvolnum>{manvolnum}</manvolnum> | ||
77 | <refmiscinfo class="source">perf</refmiscinfo> | ||
78 | <refmiscinfo class="version">{perf_version}</refmiscinfo> | ||
79 | <refmiscinfo class="manual">perf Manual</refmiscinfo> | ||
80 | </refmeta> | ||
81 | <refnamediv> | ||
82 | <refname>{manname}</refname> | ||
83 | <refpurpose>{manpurpose}</refpurpose> | ||
84 | </refnamediv> | ||
85 | endif::backend-docbook[] | ||
86 | endif::doctype-manpage[] | ||
87 | |||
88 | ifdef::backend-xhtml11[] | ||
89 | [linkperf-inlinemacro] | ||
90 | <a href="{target}.html">{target}{0?({0})}</a> | ||
91 | endif::backend-xhtml11[] | ||
diff --git a/Documentation/perf_counter/Documentation/manpage-1.72.xsl b/Documentation/perf_counter/Documentation/manpage-1.72.xsl new file mode 100644 index 000000000000..b4d315cb8c47 --- /dev/null +++ b/Documentation/perf_counter/Documentation/manpage-1.72.xsl | |||
@@ -0,0 +1,14 @@ | |||
1 | <!-- manpage-1.72.xsl: | ||
2 | special settings for manpages rendered from asciidoc+docbook | ||
3 | handles peculiarities in docbook-xsl 1.72.0 --> | ||
4 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
5 | version="1.0"> | ||
6 | |||
7 | <xsl:import href="manpage-base.xsl"/> | ||
8 | |||
9 | <!-- these are the special values for the roff control characters | ||
10 | needed for docbook-xsl 1.72.0 --> | ||
11 | <xsl:param name="git.docbook.backslash">▓</xsl:param> | ||
12 | <xsl:param name="git.docbook.dot" >⌂</xsl:param> | ||
13 | |||
14 | </xsl:stylesheet> | ||
diff --git a/Documentation/perf_counter/Documentation/manpage-base.xsl b/Documentation/perf_counter/Documentation/manpage-base.xsl new file mode 100644 index 000000000000..a264fa616093 --- /dev/null +++ b/Documentation/perf_counter/Documentation/manpage-base.xsl | |||
@@ -0,0 +1,35 @@ | |||
1 | <!-- manpage-base.xsl: | ||
2 | special formatting for manpages rendered from asciidoc+docbook --> | ||
3 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
4 | version="1.0"> | ||
5 | |||
6 | <!-- these params silence some output from xmlto --> | ||
7 | <xsl:param name="man.output.quietly" select="1"/> | ||
8 | <xsl:param name="refentry.meta.get.quietly" select="1"/> | ||
9 | |||
10 | <!-- convert asciidoc callouts to man page format; | ||
11 | git.docbook.backslash and git.docbook.dot params | ||
12 | must be supplied by another XSL file or other means --> | ||
13 | <xsl:template match="co"> | ||
14 | <xsl:value-of select="concat( | ||
15 | $git.docbook.backslash,'fB(', | ||
16 | substring-after(@id,'-'),')', | ||
17 | $git.docbook.backslash,'fR')"/> | ||
18 | </xsl:template> | ||
19 | <xsl:template match="calloutlist"> | ||
20 | <xsl:value-of select="$git.docbook.dot"/> | ||
21 | <xsl:text>sp </xsl:text> | ||
22 | <xsl:apply-templates/> | ||
23 | <xsl:text> </xsl:text> | ||
24 | </xsl:template> | ||
25 | <xsl:template match="callout"> | ||
26 | <xsl:value-of select="concat( | ||
27 | $git.docbook.backslash,'fB', | ||
28 | substring-after(@arearefs,'-'), | ||
29 | '. ',$git.docbook.backslash,'fR')"/> | ||
30 | <xsl:apply-templates/> | ||
31 | <xsl:value-of select="$git.docbook.dot"/> | ||
32 | <xsl:text>br </xsl:text> | ||
33 | </xsl:template> | ||
34 | |||
35 | </xsl:stylesheet> | ||
diff --git a/Documentation/perf_counter/Documentation/manpage-bold-literal.xsl b/Documentation/perf_counter/Documentation/manpage-bold-literal.xsl new file mode 100644 index 000000000000..608eb5df6281 --- /dev/null +++ b/Documentation/perf_counter/Documentation/manpage-bold-literal.xsl | |||
@@ -0,0 +1,17 @@ | |||
1 | <!-- manpage-bold-literal.xsl: | ||
2 | special formatting for manpages rendered from asciidoc+docbook --> | ||
3 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
4 | version="1.0"> | ||
5 | |||
6 | <!-- render literal text as bold (instead of plain or monospace); | ||
7 | this makes literal text easier to distinguish in manpages | ||
8 | viewed on a tty --> | ||
9 | <xsl:template match="literal"> | ||
10 | <xsl:value-of select="$git.docbook.backslash"/> | ||
11 | <xsl:text>fB</xsl:text> | ||
12 | <xsl:apply-templates/> | ||
13 | <xsl:value-of select="$git.docbook.backslash"/> | ||
14 | <xsl:text>fR</xsl:text> | ||
15 | </xsl:template> | ||
16 | |||
17 | </xsl:stylesheet> | ||
diff --git a/Documentation/perf_counter/Documentation/manpage-normal.xsl b/Documentation/perf_counter/Documentation/manpage-normal.xsl new file mode 100644 index 000000000000..a48f5b11f3dc --- /dev/null +++ b/Documentation/perf_counter/Documentation/manpage-normal.xsl | |||
@@ -0,0 +1,13 @@ | |||
1 | <!-- manpage-normal.xsl: | ||
2 | special settings for manpages rendered from asciidoc+docbook | ||
3 | handles anything we want to keep away from docbook-xsl 1.72.0 --> | ||
4 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
5 | version="1.0"> | ||
6 | |||
7 | <xsl:import href="manpage-base.xsl"/> | ||
8 | |||
9 | <!-- these are the normal values for the roff control characters --> | ||
10 | <xsl:param name="git.docbook.backslash">\</xsl:param> | ||
11 | <xsl:param name="git.docbook.dot" >.</xsl:param> | ||
12 | |||
13 | </xsl:stylesheet> | ||
diff --git a/Documentation/perf_counter/Documentation/manpage-suppress-sp.xsl b/Documentation/perf_counter/Documentation/manpage-suppress-sp.xsl new file mode 100644 index 000000000000..a63c7632a87d --- /dev/null +++ b/Documentation/perf_counter/Documentation/manpage-suppress-sp.xsl | |||
@@ -0,0 +1,21 @@ | |||
1 | <!-- manpage-suppress-sp.xsl: | ||
2 | special settings for manpages rendered from asciidoc+docbook | ||
3 | handles erroneous, inline .sp in manpage output of some | ||
4 | versions of docbook-xsl --> | ||
5 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
6 | version="1.0"> | ||
7 | |||
8 | <!-- attempt to work around spurious .sp at the tail of the line | ||
9 | that some versions of docbook stylesheets seem to add --> | ||
10 | <xsl:template match="simpara"> | ||
11 | <xsl:variable name="content"> | ||
12 | <xsl:apply-templates/> | ||
13 | </xsl:variable> | ||
14 | <xsl:value-of select="normalize-space($content)"/> | ||
15 | <xsl:if test="not(ancestor::authorblurb) and | ||
16 | not(ancestor::personblurb)"> | ||
17 | <xsl:text> </xsl:text> | ||
18 | </xsl:if> | ||
19 | </xsl:template> | ||
20 | |||
21 | </xsl:stylesheet> | ||
diff --git a/Documentation/perf_counter/Documentation/perf-record.txt b/Documentation/perf_counter/Documentation/perf-record.txt index a93d2ec6176a..4d3416fc7644 100644 --- a/Documentation/perf_counter/Documentation/perf-record.txt +++ b/Documentation/perf_counter/Documentation/perf-record.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | perf-record(1) | 1 | perf-record(1) |
2 | ========== | 2 | ============== |
3 | 3 | ||
4 | NAME | 4 | NAME |
5 | ---- | 5 | ---- |
@@ -53,12 +53,6 @@ OPTIONS | |||
53 | -l:: | 53 | -l:: |
54 | scale counter values | 54 | scale counter values |
55 | 55 | ||
56 | Configuration | ||
57 | ------------- | ||
58 | |||
59 | EXAMPLES | ||
60 | -------- | ||
61 | |||
62 | SEE ALSO | 56 | SEE ALSO |
63 | -------- | 57 | -------- |
64 | linkperf:git-stat[1] | 58 | linkperf:perf-stat[1] |
diff --git a/Documentation/perf_counter/Documentation/perf-report.txt b/Documentation/perf_counter/Documentation/perf-report.txt index 49efe16c9588..52d3fc6846a9 100644 --- a/Documentation/perf_counter/Documentation/perf-report.txt +++ b/Documentation/perf_counter/Documentation/perf-report.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | perf-report(1) | 1 | perf-report(1) |
2 | ========== | 2 | ============== |
3 | 3 | ||
4 | NAME | 4 | NAME |
5 | ---- | 5 | ---- |
@@ -21,12 +21,6 @@ OPTIONS | |||
21 | --input=:: | 21 | --input=:: |
22 | Input file name. (default: perf.data) | 22 | Input file name. (default: perf.data) |
23 | 23 | ||
24 | Configuration | ||
25 | ------------- | ||
26 | |||
27 | EXAMPLES | ||
28 | -------- | ||
29 | |||
30 | SEE ALSO | 24 | SEE ALSO |
31 | -------- | 25 | -------- |
32 | linkperf:perf-stat[1] | 26 | linkperf:perf-stat[1] |
diff --git a/Documentation/perf_counter/Documentation/perf-stat.txt b/Documentation/perf_counter/Documentation/perf-stat.txt index 828c59ff5f5d..a67d0e3b7d0d 100644 --- a/Documentation/perf_counter/Documentation/perf-stat.txt +++ b/Documentation/perf_counter/Documentation/perf-stat.txt | |||
@@ -51,9 +51,6 @@ OPTIONS | |||
51 | -l:: | 51 | -l:: |
52 | scale counter values | 52 | scale counter values |
53 | 53 | ||
54 | Configuration | ||
55 | ------------- | ||
56 | |||
57 | EXAMPLES | 54 | EXAMPLES |
58 | -------- | 55 | -------- |
59 | 56 | ||
@@ -74,4 +71,4 @@ $ perf stat sleep 1 | |||
74 | 71 | ||
75 | SEE ALSO | 72 | SEE ALSO |
76 | -------- | 73 | -------- |
77 | linkperf:git-tops[1] | 74 | linkperf:perf-tops[1] |
diff --git a/Documentation/perf_counter/Documentation/perf-top.txt b/Documentation/perf_counter/Documentation/perf-top.txt index 057333b72534..15251e40e4f8 100644 --- a/Documentation/perf_counter/Documentation/perf-top.txt +++ b/Documentation/perf_counter/Documentation/perf-top.txt | |||
@@ -50,12 +50,6 @@ OPTIONS | |||
50 | -l:: | 50 | -l:: |
51 | scale counter values | 51 | scale counter values |
52 | 52 | ||
53 | Configuration | ||
54 | ------------- | ||
55 | |||
56 | EXAMPLES | ||
57 | -------- | ||
58 | |||
59 | SEE ALSO | 53 | SEE ALSO |
60 | -------- | 54 | -------- |
61 | linkperf:git-stat[1] | 55 | linkperf:perf-stat[1] |
diff --git a/Documentation/perf_counter/Documentation/perf.txt b/Documentation/perf_counter/Documentation/perf.txt new file mode 100644 index 000000000000..e3d8b3832c6f --- /dev/null +++ b/Documentation/perf_counter/Documentation/perf.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | perf(1) | ||
2 | ======= | ||
3 | |||
4 | NAME | ||
5 | ---- | ||
6 | perf - Performance analysis tools for Linux | ||
7 | |||
8 | SYNOPSIS | ||
9 | -------- | ||
10 | [verse] | ||
11 | 'perf' [--version] [--help] COMMAND [ARGS] | ||
12 | |||
13 | DESCRIPTION | ||
14 | ----------- | ||
15 | Performance counters for Linux are are a new kernel-based subsystem | ||
16 | that provide a framework for all things performance analysis. It | ||
17 | covers hardware level (CPU/PMU, Performance Monitoring Unit) features | ||
18 | and software features (software counters, tracepoints) as well. | ||
19 | |||
20 | SEE ALSO | ||
21 | -------- | ||
22 | linkperf:perf-stat[1], linkperf:perf-top[1], | ||
23 | linkperf:perf-record[1], linkperf:perf-report[1] | ||
diff --git a/Documentation/perf_counter/Makefile b/Documentation/perf_counter/Makefile index 8f725840477f..416ab11e9786 100644 --- a/Documentation/perf_counter/Makefile +++ b/Documentation/perf_counter/Makefile | |||
@@ -693,6 +693,21 @@ builtin-revert.o wt-status.o: wt-status.h | |||
693 | $(LIB_FILE): $(LIB_OBJS) | 693 | $(LIB_FILE): $(LIB_OBJS) |
694 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) | 694 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) |
695 | 695 | ||
696 | doc: | ||
697 | $(MAKE) -C Documentation all | ||
698 | |||
699 | man: | ||
700 | $(MAKE) -C Documentation man | ||
701 | |||
702 | html: | ||
703 | $(MAKE) -C Documentation html | ||
704 | |||
705 | info: | ||
706 | $(MAKE) -C Documentation info | ||
707 | |||
708 | pdf: | ||
709 | $(MAKE) -C Documentation pdf | ||
710 | |||
696 | TAGS: | 711 | TAGS: |
697 | $(RM) TAGS | 712 | $(RM) TAGS |
698 | $(FIND) . -name '*.[hcS]' -print | xargs etags -a | 713 | $(FIND) . -name '*.[hcS]' -print | xargs etags -a |
@@ -781,6 +796,31 @@ ifneq (,$X) | |||
781 | $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), $(RM) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$p';) | 796 | $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), $(RM) '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/$p';) |
782 | endif | 797 | endif |
783 | 798 | ||
799 | install-doc: | ||
800 | $(MAKE) -C Documentation install | ||
801 | |||
802 | install-man: | ||
803 | $(MAKE) -C Documentation install-man | ||
804 | |||
805 | install-html: | ||
806 | $(MAKE) -C Documentation install-html | ||
807 | |||
808 | install-info: | ||
809 | $(MAKE) -C Documentation install-info | ||
810 | |||
811 | install-pdf: | ||
812 | $(MAKE) -C Documentation install-pdf | ||
813 | |||
814 | quick-install-doc: | ||
815 | $(MAKE) -C Documentation quick-install | ||
816 | |||
817 | quick-install-man: | ||
818 | $(MAKE) -C Documentation quick-install-man | ||
819 | |||
820 | quick-install-html: | ||
821 | $(MAKE) -C Documentation quick-install-html | ||
822 | |||
823 | |||
784 | ### Maintainer's dist rules | 824 | ### Maintainer's dist rules |
785 | 825 | ||
786 | perf.spec: perf.spec.in | 826 | perf.spec: perf.spec.in |
@@ -801,6 +841,26 @@ dist: perf.spec perf-archive$(X) configure | |||
801 | @$(RM) -r $(PERF_TARNAME) | 841 | @$(RM) -r $(PERF_TARNAME) |
802 | gzip -f -9 $(PERF_TARNAME).tar | 842 | gzip -f -9 $(PERF_TARNAME).tar |
803 | 843 | ||
844 | htmldocs = perf-htmldocs-$(PERF_VERSION) | ||
845 | manpages = perf-manpages-$(PERF_VERSION) | ||
846 | dist-doc: | ||
847 | $(RM) -r .doc-tmp-dir | ||
848 | mkdir .doc-tmp-dir | ||
849 | $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc | ||
850 | cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar . | ||
851 | gzip -n -9 -f $(htmldocs).tar | ||
852 | : | ||
853 | $(RM) -r .doc-tmp-dir | ||
854 | mkdir -p .doc-tmp-dir/man1 .doc-tmp-dir/man5 .doc-tmp-dir/man7 | ||
855 | $(MAKE) -C Documentation DESTDIR=./ \ | ||
856 | man1dir=../.doc-tmp-dir/man1 \ | ||
857 | man5dir=../.doc-tmp-dir/man5 \ | ||
858 | man7dir=../.doc-tmp-dir/man7 \ | ||
859 | install | ||
860 | cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar . | ||
861 | gzip -n -9 -f $(manpages).tar | ||
862 | $(RM) -r .doc-tmp-dir | ||
863 | |||
804 | rpm: dist | 864 | rpm: dist |
805 | $(RPMBUILD) -ta $(PERF_TARNAME).tar.gz | 865 | $(RPMBUILD) -ta $(PERF_TARNAME).tar.gz |
806 | 866 | ||
@@ -819,6 +879,7 @@ clean: | |||
819 | $(RM) -r $(PERF_TARNAME) .doc-tmp-dir | 879 | $(RM) -r $(PERF_TARNAME) .doc-tmp-dir |
820 | $(RM) $(PERF_TARNAME).tar.gz perf-core_$(PERF_VERSION)-*.tar.gz | 880 | $(RM) $(PERF_TARNAME).tar.gz perf-core_$(PERF_VERSION)-*.tar.gz |
821 | $(RM) $(htmldocs).tar.gz $(manpages).tar.gz | 881 | $(RM) $(htmldocs).tar.gz $(manpages).tar.gz |
882 | $(MAKE) -C Documentation/ clean | ||
822 | $(RM) PERF-VERSION-FILE PERF-CFLAGS PERF-BUILD-OPTIONS | 883 | $(RM) PERF-VERSION-FILE PERF-CFLAGS PERF-BUILD-OPTIONS |
823 | 884 | ||
824 | .PHONY: all install clean strip | 885 | .PHONY: all install clean strip |
diff --git a/Documentation/perf_counter/builtin-help.c b/Documentation/perf_counter/builtin-help.c index d2bd3177b98c..a3894bfb9b6e 100644 --- a/Documentation/perf_counter/builtin-help.c +++ b/Documentation/perf_counter/builtin-help.c | |||
@@ -317,7 +317,7 @@ static const char *cmd_to_page(const char *perf_cmd) | |||
317 | else if (is_perf_command(perf_cmd)) | 317 | else if (is_perf_command(perf_cmd)) |
318 | return prepend("perf-", perf_cmd); | 318 | return prepend("perf-", perf_cmd); |
319 | else | 319 | else |
320 | return prepend("perf", perf_cmd); | 320 | return prepend("perf-", perf_cmd); |
321 | } | 321 | } |
322 | 322 | ||
323 | static void setup_man_path(void) | 323 | static void setup_man_path(void) |