Skip to content

Commit 1ba3b5d

Browse files
committed
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf tooling updates from Ingo Molnar: "perf.data: - Streaming compression of perf ring buffer into PERF_RECORD_COMPRESSED user space records, resulting in ~3-5x perf.data file size reduction on variety of tested workloads what saves storage space on larger server systems where perf.data size can easily reach several tens or even hundreds of GiBs, especially when profiling with DWARF-based stacks and tracing of context switches. perf record: - Improve -user-regs/intr-regs suggestions to overcome errors perf annotate: - Remove hist__account_cycles() from callback, speeding up branch processing (perf record -b) perf stat: - Add a 'percore' event qualifier, e.g.: -e cpu/event=0,umask=0x3,percore=1/, that sums up the event counts for both hardware threads in a core. We can already do this with --per-core, but it's often useful to do this together with other metrics that are collected per hardware thread. I.e. now its possible to do this per-event, and have it mixed with other events not aggregated by core. arm64: - Map Brahma-B53 CPUID to cortex-a53 events. - Add Cortex-A57 and Cortex-A72 events. csky: - Add DWARF register mappings for libdw, allowing --call-graph=dwarf to work on the C-SKY arch. x86: - Add support for recording and printing XMM registers, available, for instance, on Icelake. - Add uncore_upi (Intel's "Ultra Path Interconnect" events) JSON support. UPI replaced the Intel QuickPath Interconnect (QPI) in Xeon Skylake-SP. Intel PT: - Fix instructions sampling rate. - Timestamp fixes. - Improve exported-sql-viewer GUI, allowing, for instance, to copy'n'paste the trees, useful for e-mailing" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (73 commits) perf stat: Support 'percore' event qualifier perf stat: Factor out aggregate counts printing perf tools: Add a 'percore' event qualifier perf docs: Add description for stderr perf intel-pt: Fix sample timestamp wrt non-taken branches perf intel-pt: Fix improved sample timestamp perf intel-pt: Fix instructions sampling rate perf regs x86: Add X86 specific arch__intr_reg_mask() perf parse-regs: Add generic support for arch__intr/user_reg_mask() perf parse-regs: Split parse_regs perf vendor events arm64: Add Cortex-A57 and Cortex-A72 events perf vendor events arm64: Map Brahma-B53 CPUID to cortex-a53 events perf vendor events arm64: Remove [[:xdigit:]] wildcard perf jevents: Remove unused variable perf test zstd: Fixup verbose mode output perf tests: Implement Zstd comp/decomp integration test perf inject: Enable COMPRESSED record decompression perf report: Implement perf.data record decompression perf record: Implement -z,--compression_level[=<n>] option perf report: Add stub processing of compressed events for -D ...
2 parents a13f950 + 62e1c09 commit 1ba3b5d

File tree

94 files changed

+5414
-214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+5414
-214
lines changed

tools/arch/x86/include/uapi/asm/kvm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ struct kvm_sync_regs {
381381
#define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0)
382382
#define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1)
383383
#define KVM_X86_QUIRK_LAPIC_MMIO_HOLE (1 << 2)
384+
#define KVM_X86_QUIRK_OUT_7E_INC_RIP (1 << 3)
384385

385386
#define KVM_STATE_NESTED_GUEST_MODE 0x00000001
386387
#define KVM_STATE_NESTED_RUN_PENDING 0x00000002

tools/arch/x86/include/uapi/asm/perf_regs.h

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,29 @@ enum perf_event_x86_regs {
2727
PERF_REG_X86_R13,
2828
PERF_REG_X86_R14,
2929
PERF_REG_X86_R15,
30-
30+
/* These are the limits for the GPRs. */
3131
PERF_REG_X86_32_MAX = PERF_REG_X86_GS + 1,
3232
PERF_REG_X86_64_MAX = PERF_REG_X86_R15 + 1,
33+
34+
/* These all need two bits set because they are 128bit */
35+
PERF_REG_X86_XMM0 = 32,
36+
PERF_REG_X86_XMM1 = 34,
37+
PERF_REG_X86_XMM2 = 36,
38+
PERF_REG_X86_XMM3 = 38,
39+
PERF_REG_X86_XMM4 = 40,
40+
PERF_REG_X86_XMM5 = 42,
41+
PERF_REG_X86_XMM6 = 44,
42+
PERF_REG_X86_XMM7 = 46,
43+
PERF_REG_X86_XMM8 = 48,
44+
PERF_REG_X86_XMM9 = 50,
45+
PERF_REG_X86_XMM10 = 52,
46+
PERF_REG_X86_XMM11 = 54,
47+
PERF_REG_X86_XMM12 = 56,
48+
PERF_REG_X86_XMM13 = 58,
49+
PERF_REG_X86_XMM14 = 60,
50+
PERF_REG_X86_XMM15 = 62,
51+
52+
/* These include both GPRs and XMMX registers */
53+
PERF_REG_X86_XMM_MAX = PERF_REG_X86_XMM15 + 2,
3354
};
3455
#endif /* _ASM_X86_PERF_REGS_H */

tools/arch/x86/lib/memcpy_64.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ ENTRY(__memcpy_mcsafe)
257257
/* Copy successful. Return zero */
258258
.L_done_memcpy_trap:
259259
xorl %eax, %eax
260+
.L_done:
260261
ret
261262
ENDPROC(__memcpy_mcsafe)
262263
EXPORT_SYMBOL_GPL(__memcpy_mcsafe)
@@ -273,7 +274,7 @@ EXPORT_SYMBOL_GPL(__memcpy_mcsafe)
273274
addl %edx, %ecx
274275
.E_trailing_bytes:
275276
mov %ecx, %eax
276-
ret
277+
jmp .L_done
277278

278279
/*
279280
* For write fault handling, given the destination is unaligned,
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
include ../../../scripts/Makefile.include
2+
include ../../../scripts/utilities.mak
3+
4+
# This Makefile and manpage XSL files were taken from tools/perf/Documentation
5+
# and modified for libtraceevent.
6+
7+
MAN3_TXT= \
8+
$(wildcard libtraceevent-*.txt) \
9+
libtraceevent.txt
10+
11+
MAN_TXT = $(MAN3_TXT)
12+
_MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT))
13+
_MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT))
14+
_DOC_MAN3=$(patsubst %.txt,%.3,$(MAN3_TXT))
15+
16+
MAN_XML=$(addprefix $(OUTPUT),$(_MAN_XML))
17+
MAN_HTML=$(addprefix $(OUTPUT),$(_MAN_HTML))
18+
DOC_MAN3=$(addprefix $(OUTPUT),$(_DOC_MAN3))
19+
20+
# Make the path relative to DESTDIR, not prefix
21+
ifndef DESTDIR
22+
prefix?=$(HOME)
23+
endif
24+
bindir?=$(prefix)/bin
25+
htmldir?=$(prefix)/share/doc/libtraceevent-doc
26+
pdfdir?=$(prefix)/share/doc/libtraceevent-doc
27+
mandir?=$(prefix)/share/man
28+
man3dir=$(mandir)/man3
29+
30+
ASCIIDOC=asciidoc
31+
ASCIIDOC_EXTRA = --unsafe -f asciidoc.conf
32+
ASCIIDOC_HTML = xhtml11
33+
MANPAGE_XSL = manpage-normal.xsl
34+
XMLTO_EXTRA =
35+
INSTALL?=install
36+
RM ?= rm -f
37+
38+
ifdef USE_ASCIIDOCTOR
39+
ASCIIDOC = asciidoctor
40+
ASCIIDOC_EXTRA = -a compat-mode
41+
ASCIIDOC_EXTRA += -I. -rasciidoctor-extensions
42+
ASCIIDOC_EXTRA += -a mansource="libtraceevent" -a manmanual="libtraceevent Manual"
43+
ASCIIDOC_HTML = xhtml5
44+
endif
45+
46+
XMLTO=xmlto
47+
48+
_tmp_tool_path := $(call get-executable,$(ASCIIDOC))
49+
ifeq ($(_tmp_tool_path),)
50+
missing_tools = $(ASCIIDOC)
51+
endif
52+
53+
ifndef USE_ASCIIDOCTOR
54+
_tmp_tool_path := $(call get-executable,$(XMLTO))
55+
ifeq ($(_tmp_tool_path),)
56+
missing_tools += $(XMLTO)
57+
endif
58+
endif
59+
60+
#
61+
# For asciidoc ...
62+
# -7.1.2, no extra settings are needed.
63+
# 8.0-, set ASCIIDOC8.
64+
#
65+
66+
#
67+
# For docbook-xsl ...
68+
# -1.68.1, set ASCIIDOC_NO_ROFF? (based on changelog from 1.73.0)
69+
# 1.69.0, no extra settings are needed?
70+
# 1.69.1-1.71.0, set DOCBOOK_SUPPRESS_SP?
71+
# 1.71.1, no extra settings are needed?
72+
# 1.72.0, set DOCBOOK_XSL_172.
73+
# 1.73.0-, set ASCIIDOC_NO_ROFF
74+
#
75+
76+
#
77+
# If you had been using DOCBOOK_XSL_172 in an attempt to get rid
78+
# of 'the ".ft C" problem' in your generated manpages, and you
79+
# instead ended up with weird characters around callouts, try
80+
# using ASCIIDOC_NO_ROFF instead (it works fine with ASCIIDOC8).
81+
#
82+
83+
ifdef ASCIIDOC8
84+
ASCIIDOC_EXTRA += -a asciidoc7compatible
85+
endif
86+
ifdef DOCBOOK_XSL_172
87+
ASCIIDOC_EXTRA += -a libtraceevent-asciidoc-no-roff
88+
MANPAGE_XSL = manpage-1.72.xsl
89+
else
90+
ifdef ASCIIDOC_NO_ROFF
91+
# docbook-xsl after 1.72 needs the regular XSL, but will not
92+
# pass-thru raw roff codes from asciidoc.conf, so turn them off.
93+
ASCIIDOC_EXTRA += -a libtraceevent-asciidoc-no-roff
94+
endif
95+
endif
96+
ifdef MAN_BOLD_LITERAL
97+
XMLTO_EXTRA += -m manpage-bold-literal.xsl
98+
endif
99+
ifdef DOCBOOK_SUPPRESS_SP
100+
XMLTO_EXTRA += -m manpage-suppress-sp.xsl
101+
endif
102+
103+
SHELL_PATH ?= $(SHELL)
104+
# Shell quote;
105+
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
106+
107+
DESTDIR ?=
108+
DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))'
109+
110+
export DESTDIR DESTDIR_SQ
111+
112+
#
113+
# Please note that there is a minor bug in asciidoc.
114+
# The version after 6.0.3 _will_ include the patch found here:
115+
# http://marc.theaimsgroup.com/?l=libtraceevent&m=111558757202243&w=2
116+
#
117+
# Until that version is released you may have to apply the patch
118+
# yourself - yes, all 6 characters of it!
119+
#
120+
QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir
121+
QUIET_SUBDIR1 =
122+
123+
ifneq ($(findstring $(MAKEFLAGS),w),w)
124+
PRINT_DIR = --no-print-directory
125+
else # "make -w"
126+
NO_SUBDIR = :
127+
endif
128+
129+
ifneq ($(findstring $(MAKEFLAGS),s),s)
130+
ifneq ($(V),1)
131+
QUIET_ASCIIDOC = @echo ' ASCIIDOC '$@;
132+
QUIET_XMLTO = @echo ' XMLTO '$@;
133+
QUIET_SUBDIR0 = +@subdir=
134+
QUIET_SUBDIR1 = ;$(NO_SUBDIR) \
135+
echo ' SUBDIR ' $$subdir; \
136+
$(MAKE) $(PRINT_DIR) -C $$subdir
137+
export V
138+
endif
139+
endif
140+
141+
all: html man
142+
143+
man: man3
144+
man3: $(DOC_MAN3)
145+
146+
html: $(MAN_HTML)
147+
148+
$(MAN_HTML) $(DOC_MAN3): asciidoc.conf
149+
150+
install: install-man
151+
152+
check-man-tools:
153+
ifdef missing_tools
154+
$(error "You need to install $(missing_tools) for man pages")
155+
endif
156+
157+
do-install-man: man
158+
$(call QUIET_INSTALL, Documentation-man) \
159+
$(INSTALL) -d -m 755 $(DESTDIR)$(man3dir); \
160+
$(INSTALL) -m 644 $(DOC_MAN3) $(DESTDIR)$(man3dir);
161+
162+
install-man: check-man-tools man do-install-man
163+
164+
uninstall: uninstall-man
165+
166+
uninstall-man:
167+
$(call QUIET_UNINST, Documentation-man) \
168+
$(Q)$(RM) $(addprefix $(DESTDIR)$(man3dir)/,$(DOC_MAN3))
169+
170+
171+
ifdef missing_tools
172+
DO_INSTALL_MAN = $(warning Please install $(missing_tools) to have the man pages installed)
173+
else
174+
DO_INSTALL_MAN = do-install-man
175+
endif
176+
177+
CLEAN_FILES = \
178+
$(MAN_XML) $(addsuffix +,$(MAN_XML)) \
179+
$(MAN_HTML) $(addsuffix +,$(MAN_HTML)) \
180+
$(DOC_MAN3) *.3
181+
182+
clean:
183+
$(call QUIET_CLEAN, Documentation) $(RM) $(CLEAN_FILES)
184+
185+
ifdef USE_ASCIIDOCTOR
186+
$(OUTPUT)%.3 : $(OUTPUT)%.txt
187+
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
188+
$(ASCIIDOC) -b manpage -d manpage \
189+
$(ASCIIDOC_EXTRA) -alibtraceevent_version=$(EVENT_PARSE_VERSION) -o $@+ $< && \
190+
mv $@+ $@
191+
endif
192+
193+
$(OUTPUT)%.3 : $(OUTPUT)%.xml
194+
$(QUIET_XMLTO)$(RM) $@ && \
195+
$(XMLTO) -o $(OUTPUT). -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
196+
197+
$(OUTPUT)%.xml : %.txt
198+
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
199+
$(ASCIIDOC) -b docbook -d manpage \
200+
$(ASCIIDOC_EXTRA) -alibtraceevent_version=$(EVENT_PARSE_VERSION) -o $@+ $< && \
201+
mv $@+ $@
202+
203+
$(MAN_HTML): $(OUTPUT)%.html : %.txt
204+
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
205+
$(ASCIIDOC) -b $(ASCIIDOC_HTML) -d manpage \
206+
$(ASCIIDOC_EXTRA) -aperf_version=$(EVENT_PARSE_VERSION) -o $@+ $< && \
207+
mv $@+ $@
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
## linktep: macro
2+
#
3+
# Usage: linktep:command[manpage-section]
4+
#
5+
# Note, {0} is the manpage section, while {target} is the command.
6+
#
7+
# Show TEP link as: <command>(<section>); if section is defined, else just show
8+
# the command.
9+
10+
[macros]
11+
(?su)[\\]?(?P<name>linktep):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
12+
13+
[attributes]
14+
asterisk=&#42;
15+
plus=&#43;
16+
caret=&#94;
17+
startsb=&#91;
18+
endsb=&#93;
19+
tilde=&#126;
20+
21+
ifdef::backend-docbook[]
22+
[linktep-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::tep-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+
&#10;.ft C&#10;
38+
endif::doctype-manpage[]
39+
|
40+
ifdef::doctype-manpage[]
41+
&#10;.ft&#10;
42+
endif::doctype-manpage[]
43+
</literallayout>
44+
{title#}</example>
45+
endif::tep-asciidoc-no-roff[]
46+
47+
ifdef::tep-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::tep-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">libtraceevent</refmiscinfo>
78+
<refmiscinfo class="version">{libtraceevent_version}</refmiscinfo>
79+
<refmiscinfo class="manual">libtraceevent Manual</refmiscinfo>
80+
</refmeta>
81+
<refnamediv>
82+
<refname>{manname1}</refname>
83+
<refname>{manname2}</refname>
84+
<refname>{manname3}</refname>
85+
<refname>{manname4}</refname>
86+
<refname>{manname5}</refname>
87+
<refname>{manname6}</refname>
88+
<refname>{manname7}</refname>
89+
<refname>{manname8}</refname>
90+
<refname>{manname9}</refname>
91+
<refname>{manname10}</refname>
92+
<refname>{manname11}</refname>
93+
<refname>{manname12}</refname>
94+
<refname>{manname13}</refname>
95+
<refname>{manname14}</refname>
96+
<refname>{manname15}</refname>
97+
<refname>{manname16}</refname>
98+
<refname>{manname17}</refname>
99+
<refname>{manname18}</refname>
100+
<refname>{manname19}</refname>
101+
<refname>{manname20}</refname>
102+
<refname>{manname21}</refname>
103+
<refname>{manname22}</refname>
104+
<refname>{manname23}</refname>
105+
<refname>{manname24}</refname>
106+
<refname>{manname25}</refname>
107+
<refname>{manname26}</refname>
108+
<refname>{manname27}</refname>
109+
<refname>{manname28}</refname>
110+
<refname>{manname29}</refname>
111+
<refname>{manname30}</refname>
112+
<refpurpose>{manpurpose}</refpurpose>
113+
</refnamediv>
114+
endif::backend-docbook[]
115+
endif::doctype-manpage[]
116+
117+
ifdef::backend-xhtml11[]
118+
[linktep-inlinemacro]
119+
<a href="{target}.html">{target}{0?({0})}</a>
120+
endif::backend-xhtml11[]

0 commit comments

Comments
 (0)