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

Commit e0c5c5e3 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

Merge tag 'perf-core-for-mingo-5.3-20190715' of...

Merge tag 'perf-core-for-mingo-5.3-20190715' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

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

 perf db-export:
  Adrian Hunter:
  - Improvements in how COMM details are exported to databases for
    post processing and use in the sql-viewer.py UI.

  - Export switch events to the database.

 BPF:
  Arnaldo Carvalho de Melo:
  - Bump rlimit(MEMLOCK) for 'perf test bpf' and 'perf trace', just like
    selftests/bpf/bpf_rlimit.h do, which makes errors due to exhaustion of
    this limit, which are kinda cryptic (EPERM sometimes) less frequent.

 perf version:
  Ravi Bangoria:
  - Fix segfault due to missing OPT_END(), noticed on PowerPC.

 perf vendor events:
  Thomas Richter:
  - Add JSON files for IBM s/390 machine type 8561.

 perf cs-etm (ARM):
  YueHaibing:
  - Fix two cases of error returns not bing done properly: Invalid ERR_PTR() use
    and loss of propagation error codes.
parents e4557c1a 916c31ff
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2289,6 +2289,12 @@ static int process_switch_event(struct perf_tool *tool,
	if (perf_event__process_switch(tool, event, sample, machine) < 0)
		return -1;

	if (scripting_ops && scripting_ops->process_switch)
		scripting_ops->process_switch(event, sample, machine);

	if (!script->show_switch_events)
		return 0;

	thread = machine__findnew_thread(machine, sample->pid,
					 sample->tid);
	if (thread == NULL) {
@@ -2467,7 +2473,7 @@ static int __cmd_script(struct perf_script *script)
		script->tool.mmap = process_mmap_event;
		script->tool.mmap2 = process_mmap2_event;
	}
	if (script->show_switch_events)
	if (script->show_switch_events || (scripting_ops && scripting_ops->process_switch))
		script->tool.context_switch = process_switch_event;
	if (script->show_namespace_events)
		script->tool.namespaces = process_namespaces_event;
+10 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <api/fs/tracing_path.h>
#include <bpf/bpf.h>
#include "util/bpf_map.h"
#include "util/rlimit.h"
#include "builtin.h"
#include "util/cgroup.h"
#include "util/color.h"
@@ -3864,6 +3865,15 @@ int cmd_trace(int argc, const char **argv)
		goto out;
	}

	/*
	 * Parsing .perfconfig may entail creating a BPF event, that may need
	 * to create BPF maps, so bump RLIM_MEMLOCK as the default 64K setting
	 * is too small. This affects just this process, not touching the
	 * global setting. If it fails we'll get something in 'perf trace -v'
	 * to help diagnose the problem.
	 */
	rlimit__bump_memlock();

	err = perf_config(trace__config, &trace);
	if (err)
		goto out;
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ static struct version version;
static struct option version_options[] = {
	OPT_BOOLEAN(0, "build-options", &version.build_options,
		    "display the build options"),
	OPT_END(),
};

static const char * const version_usage[] = {
+58 −0
Original line number Diff line number Diff line
[
	{
		"Unit": "CPU-M-CF",
		"EventCode": "0",
		"EventName": "CPU_CYCLES",
		"BriefDescription": "CPU Cycles",
		"PublicDescription": "Cycle Count"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "1",
		"EventName": "INSTRUCTIONS",
		"BriefDescription": "Instructions",
		"PublicDescription": "Instruction Count"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "2",
		"EventName": "L1I_DIR_WRITES",
		"BriefDescription": "L1I Directory Writes",
		"PublicDescription": "Level-1 I-Cache Directory Write Count"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "3",
		"EventName": "L1I_PENALTY_CYCLES",
		"BriefDescription": "L1I Penalty Cycles",
		"PublicDescription": "Level-1 I-Cache Penalty Cycle Count"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "4",
		"EventName": "L1D_DIR_WRITES",
		"BriefDescription": "L1D Directory Writes",
		"PublicDescription": "Level-1 D-Cache Directory Write Count"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "5",
		"EventName": "L1D_PENALTY_CYCLES",
		"BriefDescription": "L1D Penalty Cycles",
		"PublicDescription": "Level-1 D-Cache Penalty Cycle Count"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "32",
		"EventName": "PROBLEM_STATE_CPU_CYCLES",
		"BriefDescription": "Problem-State CPU Cycles",
		"PublicDescription": "Problem-State Cycle Count"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "33",
		"EventName": "PROBLEM_STATE_INSTRUCTIONS",
		"BriefDescription": "Problem-State Instructions",
		"PublicDescription": "Problem-State Instruction Count"
	},
]
+114 −0
Original line number Diff line number Diff line
[
	{
		"Unit": "CPU-M-CF",
		"EventCode": "64",
		"EventName": "PRNG_FUNCTIONS",
		"BriefDescription": "PRNG Functions",
		"PublicDescription": "Total number of the PRNG functions issued by the CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "65",
		"EventName": "PRNG_CYCLES",
		"BriefDescription": "PRNG Cycles",
		"PublicDescription": "Total number of CPU cycles when the DEA/AES coprocessor is busy performing PRNG functions issued by the CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "66",
		"EventName": "PRNG_BLOCKED_FUNCTIONS",
		"BriefDescription": "PRNG Blocked Functions",
		"PublicDescription": "Total number of the PRNG functions that are issued by the CPU and are blocked because the DEA/AES coprocessor is busy performing a function issued by another CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "67",
		"EventName": "PRNG_BLOCKED_CYCLES",
		"BriefDescription": "PRNG Blocked Cycles",
		"PublicDescription": "Total number of CPU cycles blocked for the PRNG functions issued by the CPU because the DEA/AES coprocessor is busy performing a function issued by another CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "68",
		"EventName": "SHA_FUNCTIONS",
		"BriefDescription": "SHA Functions",
		"PublicDescription": "Total number of SHA functions issued by the CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "69",
		"EventName": "SHA_CYCLES",
		"BriefDescription": "SHA Cycles",
		"PublicDescription": "Total number of CPU cycles when the SHA coprocessor is busy performing the SHA functions issued by the CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "70",
		"EventName": "SHA_BLOCKED_FUNCTIONS",
		"BriefDescription": "SHA Blocked Functions",
		"PublicDescription": "Total number of the SHA functions that are issued by the CPU and are blocked because the SHA coprocessor is busy performing a function issued by another CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "71",
		"EventName": "SHA_BLOCKED_CYCLES",
		"BriefDescription": "SHA Bloced Cycles",
		"PublicDescription": "Total number of CPU cycles blocked for the SHA functions issued by the CPU because the SHA coprocessor is busy performing a function issued by another CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "72",
		"EventName": "DEA_FUNCTIONS",
		"BriefDescription": "DEA Functions",
		"PublicDescription": "Total number of the DEA functions issued by the CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "73",
		"EventName": "DEA_CYCLES",
		"BriefDescription": "DEA Cycles",
		"PublicDescription": "Total number of CPU cycles when the DEA/AES coprocessor is busy performing the DEA functions issued by the CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "74",
		"EventName": "DEA_BLOCKED_FUNCTIONS",
		"BriefDescription": "DEA Blocked Functions",
		"PublicDescription": "Total number of the DEA functions that are issued by the CPU and are blocked because the DEA/AES coprocessor is busy performing a function issued by another CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "75",
		"EventName": "DEA_BLOCKED_CYCLES",
		"BriefDescription": "DEA Blocked Cycles",
		"PublicDescription": "Total number of CPU cycles blocked for the DEA functions issued by the CPU because the DEA/AES coprocessor is busy performing a function issued by another CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "76",
		"EventName": "AES_FUNCTIONS",
		"BriefDescription": "AES Functions",
		"PublicDescription": "Total number of AES functions issued by the CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "77",
		"EventName": "AES_CYCLES",
		"BriefDescription": "AES Cycles",
		"PublicDescription": "Total number of CPU cycles when the DEA/AES coprocessor is busy performing the AES functions issued by the CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "78",
		"EventName": "AES_BLOCKED_FUNCTIONS",
		"BriefDescription": "AES Blocked Functions",
		"PublicDescription": "Total number of AES functions that are issued by the CPU and are blocked because the DEA/AES coprocessor is busy performing a function issued by another CPU"
	},
	{
		"Unit": "CPU-M-CF",
		"EventCode": "79",
		"EventName": "AES_BLOCKED_CYCLES",
		"BriefDescription": "AES Blocked Cycles",
		"PublicDescription": "Total number of CPU cycles blocked for the AES functions issued by the CPU because the DEA/AES coprocessor is busy performing a function issued by another CPU"
	},
]
Loading