Commit 852fb4a7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "No kernel side changes, all tooling fixes plus two tooling cleanups
  that were committed late in the merge window alongside the perf
  annotate fixes, delayed by Arnaldo's European trip"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
  perf annotate: Fix segfault with source toggle
  perf annotate: Align struct annotate_args
  perf annotate: Simplify disasm_line allocation and freeing code
  perf annotate: Remove privsize from symbol__annotate() args
  perf probe: Check return value of strlist__add() for -ENOMEM
  perf config: Document missing config options
  perf annotate: Fix perf config option description
  perf annotate: Prefer cmdline option over default config
  perf annotate: Make perf config effective
  perf config: Introduce perf_config_u8()
  perf annotate: Fix --show-nr-samples for tui/stdio2
  perf annotate: Fix --show-total-period for tui/stdio2
  perf annotate/tui: Re-render title bar after switching back from script browser
  tools headers UAPI: Update tools's copy of kvm.h headers
  tools arch x86: Sync the msr-index.h copy with the kernel sources
  perf arch powerpc: Sync powerpc syscall.tbl with the kernel sources
  perf auxtrace: Add auxtrace_record__read_finish()
  perf arm-spe: Fix endless record after being terminated
  perf cs-etm: Fix endless record after being terminated
  perf intel-bts: Fix endless record after being terminated
  ...
parents e130a920 7977fed9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -512,6 +512,8 @@
#define MSR_K7_HWCR			0xc0010015
#define MSR_K7_HWCR_SMMLOCK_BIT		0
#define MSR_K7_HWCR_SMMLOCK		BIT_ULL(MSR_K7_HWCR_SMMLOCK_BIT)
#define MSR_K7_HWCR_IRPERF_EN_BIT	30
#define MSR_K7_HWCR_IRPERF_EN		BIT_ULL(MSR_K7_HWCR_IRPERF_EN_BIT)
#define MSR_K7_FID_VID_CTL		0xc0010041
#define MSR_K7_FID_VID_STATUS		0xc0010042

+1 −0
Original line number Diff line number Diff line
@@ -390,6 +390,7 @@ struct kvm_sync_regs {
#define KVM_STATE_NESTED_GUEST_MODE	0x00000001
#define KVM_STATE_NESTED_RUN_PENDING	0x00000002
#define KVM_STATE_NESTED_EVMCS		0x00000004
#define KVM_STATE_NESTED_MTF_PENDING	0x00000008

#define KVM_STATE_NESTED_SMM_GUEST_MODE	0x00000001
#define KVM_STATE_NESTED_SMM_VMXON	0x00000002
+73 −1
Original line number Diff line number Diff line
@@ -239,7 +239,6 @@ buildid.*::
		set buildid.dir to /dev/null. The default is $HOME/.debug

annotate.*::
	These options work only for TUI.
	These are in control of addresses, jump function, source code
	in lines of assembly code from a specific program.

@@ -269,6 +268,8 @@ annotate.*::
		│        mov    (%rdi),%rdx
		│              return n;

		This option works with tui, stdio2 browsers.

        annotate.use_offset::
		Basing on a first address of a loaded function, offset can be used.
		Instead of using original addresses of assembly code,
@@ -287,6 +288,8 @@ annotate.*::

		             368:│  mov    0x8(%r14),%rdi

		This option works with tui, stdio2 browsers.

	annotate.jump_arrows::
		There can be jump instruction among assembly code.
		Depending on a boolean value of jump_arrows,
@@ -306,6 +309,8 @@ annotate.*::
		│1330:   mov    %r15,%r10
		│1333:   cmp    %r15,%r14

		This option works with tui browser.

        annotate.show_linenr::
		When showing source code if this option is 'true',
		line numbers are printed as below.
@@ -325,6 +330,8 @@ annotate.*::
		│                     array++;
		│             }

		This option works with tui, stdio2 browsers.

        annotate.show_nr_jumps::
		Let's see a part of assembly code.

@@ -335,6 +342,8 @@ annotate.*::

		│1 1382:   movb   $0x1,-0x270(%rbp)

		This option works with tui, stdio2 browsers.

        annotate.show_total_period::
		To compare two records on an instruction base, with this option
		provided, display total number of samples that belong to a line
@@ -348,11 +357,30 @@ annotate.*::

		99.93 │      mov    %eax,%eax

		This option works with tui, stdio2, stdio browsers.

	annotate.show_nr_samples::
		By default perf annotate shows percentage of samples. This option
		can be used to print absolute number of samples. Ex, when set as
		false:

		Percent│
		 74.03 │      mov    %fs:0x28,%rax

		When set as true:

		Samples│
		     6 │      mov    %fs:0x28,%rax

		This option works with tui, stdio2, stdio browsers.

	annotate.offset_level::
		Default is '1', meaning just jump targets will have offsets show right beside
		the instruction. When set to '2' 'call' instructions will also have its offsets
		shown, 3 or higher will show offsets for all instructions.

		This option works with tui, stdio2 browsers.

hist.*::
	hist.percentage::
		This option control the way to calculate overhead of filtered entries -
@@ -490,6 +518,12 @@ top.*::
		column by default.
		The default is 'true'.

	top.call-graph::
		This is identical to 'call-graph.record-mode', except it is
		applicable only for 'top' subcommand. This option ONLY setup
		the unwind method. To enable 'perf top' to actually use it,
		the command line option -g must be specified.

man.*::
	man.viewer::
		This option can assign a tool to view manual pages when 'help'
@@ -517,6 +551,16 @@ record.*::
		But if this option is 'no-cache', it will not update the build-id cache.
		'skip' skips post-processing and does not update the cache.

	record.call-graph::
		This is identical to 'call-graph.record-mode', except it is
		applicable only for 'record' subcommand. This option ONLY setup
		the unwind method. To enable 'perf record' to actually use it,
		the command line option -g must be specified.

	record.aio::
		Use 'n' control blocks in asynchronous (Posix AIO) trace writing
		mode ('n' default: 1, max: 4).

diff.*::
	diff.order::
		This option sets the number of columns to sort the result.
@@ -566,6 +610,11 @@ trace.*::
		"libbeauty", the default, to use the same argument beautifiers used in the
		strace-like sys_enter+sys_exit lines.

ftrace.*::
	ftrace.tracer::
		Can be used to select the default tracer. Possible values are
		'function' and 'function_graph'.

llvm.*::
	llvm.clang-path::
		Path to clang. If omit, search it from $PATH.
@@ -610,6 +659,29 @@ scripts.*::
	The script gets the same options passed as a full perf script,
	in particular -i perfdata file, --cpu, --tid

convert.*::

	convert.queue-size::
		Limit the size of ordered_events queue, so we could control
		allocation size of perf data files without proper finished
		round events.

intel-pt.*::

	intel-pt.cache-divisor::

	intel-pt.mispred-all::
		If set, Intel PT decoder will set the mispred flag on all
		branches.

auxtrace.*::

	auxtrace.dumpdir::
		s390 only. The directory to save the auxiliary trace buffer
		can be changed using this option. Ex, auxtrace.dumpdir=/tmp.
		If the directory does not exist or has the wrong file type,
		the current directory is used.

SEE ALSO
--------
linkperf:perf[1]
+2 −16
Original line number Diff line number Diff line
@@ -858,21 +858,6 @@ static void cs_etm_recording_free(struct auxtrace_record *itr)
	free(ptr);
}

static int cs_etm_read_finish(struct auxtrace_record *itr, int idx)
{
	struct cs_etm_recording *ptr =
			container_of(itr, struct cs_etm_recording, itr);
	struct evsel *evsel;

	evlist__for_each_entry(ptr->evlist, evsel) {
		if (evsel->core.attr.type == ptr->cs_etm_pmu->type)
			return perf_evlist__enable_event_idx(ptr->evlist,
							     evsel, idx);
	}

	return -EINVAL;
}

struct auxtrace_record *cs_etm_record_init(int *err)
{
	struct perf_pmu *cs_etm_pmu;
@@ -892,6 +877,7 @@ struct auxtrace_record *cs_etm_record_init(int *err)
	}

	ptr->cs_etm_pmu			= cs_etm_pmu;
	ptr->itr.pmu			= cs_etm_pmu;
	ptr->itr.parse_snapshot_options	= cs_etm_parse_snapshot_options;
	ptr->itr.recording_options	= cs_etm_recording_options;
	ptr->itr.info_priv_size		= cs_etm_info_priv_size;
@@ -901,7 +887,7 @@ struct auxtrace_record *cs_etm_record_init(int *err)
	ptr->itr.snapshot_finish	= cs_etm_snapshot_finish;
	ptr->itr.reference		= cs_etm_reference;
	ptr->itr.free			= cs_etm_recording_free;
	ptr->itr.read_finish		= cs_etm_read_finish;
	ptr->itr.read_finish		= auxtrace_record__read_finish;

	*err = 0;
	return &ptr->itr;
+2 −15
Original line number Diff line number Diff line
@@ -158,20 +158,6 @@ static void arm_spe_recording_free(struct auxtrace_record *itr)
	free(sper);
}

static int arm_spe_read_finish(struct auxtrace_record *itr, int idx)
{
	struct arm_spe_recording *sper =
			container_of(itr, struct arm_spe_recording, itr);
	struct evsel *evsel;

	evlist__for_each_entry(sper->evlist, evsel) {
		if (evsel->core.attr.type == sper->arm_spe_pmu->type)
			return perf_evlist__enable_event_idx(sper->evlist,
							     evsel, idx);
	}
	return -EINVAL;
}

struct auxtrace_record *arm_spe_recording_init(int *err,
					       struct perf_pmu *arm_spe_pmu)
{
@@ -189,12 +175,13 @@ struct auxtrace_record *arm_spe_recording_init(int *err,
	}

	sper->arm_spe_pmu = arm_spe_pmu;
	sper->itr.pmu = arm_spe_pmu;
	sper->itr.recording_options = arm_spe_recording_options;
	sper->itr.info_priv_size = arm_spe_info_priv_size;
	sper->itr.info_fill = arm_spe_info_fill;
	sper->itr.free = arm_spe_recording_free;
	sper->itr.reference = arm_spe_reference;
	sper->itr.read_finish = arm_spe_read_finish;
	sper->itr.read_finish = auxtrace_record__read_finish;
	sper->itr.alignment = 0;

	*err = 0;
Loading