Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eaeb1f4d authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-core-for-mingo-4.18-20180502' of...

Merge tag 'perf-core-for-mingo-4.18-20180502' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

 into perf/core

Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

perf stat: (Jiri Olsa)

- Display time in precision based on std deviation

- Add --table option to display time of each run

- Display length strings of each run for --table option

perf buildid-cache: (Ravi Bangoria)

- Add --list and --purge-all options

perf test: (Hendrik Brueckner)

- Let 'perf test list' display subtests

Core libraries:

- Remove the splitting of maps into MAP__FUNCTION and MAP__VARIABLE.
  It isn't needed, adds complexity, so remove this split in a very granular
  fashion using better ways of detecting if a map is executable, using map->prot,
  etc. More is needed to further untangle map aspects from DSO ones and
  also to have arch specific stuff better isolated.  (Arnaldo Carvalho de Melo)

- Fix spelling mistake: "builid" -> "buildid" in a jitdump error
  message (Colin Ian King)

Build system: (Jiri Olsa)

- Add support to check 2 independent files in check-headers.sh

Documentation: (Takashi Iwai)

- Support for asciidoctor, since 'asciidoc' wasn't so far ported to
  python3 and distros are ditching python2

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 2d618bdf 107cad95
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -10,6 +10,12 @@ u8 kallsyms2elf_type(char type)
	return (type == 't' || type == 'w') ? STT_FUNC : STT_OBJECT;
}

bool kallsyms__is_function(char symbol_type)
{
	symbol_type = toupper(symbol_type);
	return symbol_type == 'T' || symbol_type == 'W';
}

int kallsyms__parse(const char *filename, void *arg,
		    int (*process_symbol)(void *arg, const char *name,
					  char type, u64 start))
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ static inline u8 kallsyms2elf_binding(char type)

u8 kallsyms2elf_type(char type);

bool kallsyms__is_function(char symbol_type);

int kallsyms__parse(const char *filename, void *arg,
		    int (*process_symbol)(void *arg, const char *name,
					  char type, u64 start));
+24 −5
Original line number Diff line number Diff line
@@ -47,7 +47,8 @@ man5dir=$(mandir)/man5
man7dir=$(mandir)/man7

ASCIIDOC=asciidoc
ASCIIDOC_EXTRA = --unsafe
ASCIIDOC_EXTRA = --unsafe -f asciidoc.conf
ASCIIDOC_HTML = xhtml11
MANPAGE_XSL = manpage-normal.xsl
XMLTO_EXTRA =
INSTALL?=install
@@ -55,6 +56,14 @@ RM ?= rm -f
DOC_REF = origin/man
HTML_REF = origin/html

ifdef USE_ASCIIDOCTOR
ASCIIDOC = asciidoctor
ASCIIDOC_EXTRA = -a compat-mode
ASCIIDOC_EXTRA += -I. -rasciidoctor-extensions
ASCIIDOC_EXTRA += -a mansource="perf" -a manmanual="perf Manual"
ASCIIDOC_HTML = xhtml5
endif

infodir?=$(prefix)/share/info
MAKEINFO=makeinfo
INSTALL_INFO=install-info
@@ -73,10 +82,12 @@ ifeq ($(_tmp_tool_path),)
	missing_tools = $(ASCIIDOC)
endif

ifndef USE_ASCIIDOCTOR
_tmp_tool_path := $(call get-executable,$(XMLTO))
ifeq ($(_tmp_tool_path),)
	missing_tools += $(XMLTO)
endif
endif

#
# For asciidoc ...
@@ -264,9 +275,17 @@ clean:

$(MAN_HTML): $(OUTPUT)%.html : %.txt
	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
	$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
	$(ASCIIDOC) -b $(ASCIIDOC_HTML) -d manpage \
		$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \
	mv $@+ $@

ifdef USE_ASCIIDOCTOR
$(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.txt
	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
	$(ASCIIDOC) -b manpage -d manpage \
		$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \
	mv $@+ $@
endif

$(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml
	$(QUIET_XMLTO)$(RM) $@ && \
@@ -274,7 +293,7 @@ $(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : $(OUTPUT)%.xml

$(OUTPUT)%.xml : %.txt
	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
	$(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
	$(ASCIIDOC) -b docbook -d manpage \
		$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \
	mv $@+ $@

@@ -321,13 +340,13 @@ howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
	mv $@+ $@

$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
	$(QUIET_ASCIIDOC)$(ASCIIDOC) -b xhtml11 $*.txt
	$(QUIET_ASCIIDOC)$(ASCIIDOC) -b $(ASCIIDOC_HTML) $*.txt

WEBDOC_DEST = /pub/software/tools/perf/docs

$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
	$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
	sed -e '1,/^$$/d' $< | $(ASCIIDOC) -b xhtml11 - >$@+ && \
	sed -e '1,/^$$/d' $< | $(ASCIIDOC) -b $(ASCIIDOC_HTML) - >$@+ && \
	mv $@+ $@

# UNIMPLEMENTED
+29 −0
Original line number Diff line number Diff line
require 'asciidoctor'
require 'asciidoctor/extensions'

module Perf
  module Documentation
    class LinkPerfProcessor < Asciidoctor::Extensions::InlineMacroProcessor
      use_dsl

      named :chrome

      def process(parent, target, attrs)
        if parent.document.basebackend? 'html'
          %(<a href="#{target}.html">#{target}(#{attrs[1]})</a>\n)
        elsif parent.document.basebackend? 'manpage'
          "#{target}(#{attrs[1]})"
        elsif parent.document.basebackend? 'docbook'
          "<citerefentry>\n" \
            "<refentrytitle>#{target}</refentrytitle>" \
            "<manvolnum>#{attrs[1]}</manvolnum>\n" \
          "</citerefentry>\n"
        end
      end
    end
  end
end

Asciidoctor::Extensions.register do
  inline_macro Perf::Documentation::LinkPerfProcessor, :linkperf
end
+6 −1
Original line number Diff line number Diff line
@@ -48,6 +48,9 @@ OPTIONS
--purge=::
        Purge all cached binaries including older caches which have specified
	path from the cache.
-P::
--purge-all::
	Purge all cached binaries. This will flush out entire cache.
-M::
--missing=::
	List missing build ids in the cache for the specified file.
@@ -59,7 +62,9 @@ OPTIONS
	exactly same build-id, that is replaced by new one. It can be used
	to update kallsyms and kernel dso to vmlinux in order to support
	annotation.

-l::
--list::
	List all valid binaries from cache.
-v::
--verbose::
	Be more verbose.
Loading