Commit f289d990 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'perf-tools-fixes-for-v5.13-2021-05-28' of...

Merge tag 'perf-tools-fixes-for-v5.13-2021-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Fix error checking of BPF prog attachment in 'perf stat'.

 - Fix getting maximum number of fds in the vendor events JSON parser.

 - Move debug initialization earlier, fixing a segfault in some cases.

 - Fix eventcode of power10 JSON events.

* tag 'perf-tools-fixes-for-v5.13-2021-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
  perf vendor events powerpc: Fix eventcode of power10 JSON events
  perf stat: Fix error check for bpf_program__attach
  perf debug: Move debug initialization earlier
  perf jevents: Fix getting maximum number of fds
parents 7c0ec89d 8fc4e4aa
...@@ -443,6 +443,8 @@ int main(int argc, const char **argv) ...@@ -443,6 +443,8 @@ int main(int argc, const char **argv)
const char *cmd; const char *cmd;
char sbuf[STRERR_BUFSIZE]; char sbuf[STRERR_BUFSIZE];
perf_debug_setup();
/* libsubcmd init */ /* libsubcmd init */
exec_cmd_init("perf", PREFIX, PERF_EXEC_PATH, EXEC_PATH_ENVIRONMENT); exec_cmd_init("perf", PREFIX, PERF_EXEC_PATH, EXEC_PATH_ENVIRONMENT);
pager_init(PERF_PAGER_ENVIRONMENT); pager_init(PERF_PAGER_ENVIRONMENT);
...@@ -531,8 +533,6 @@ int main(int argc, const char **argv) ...@@ -531,8 +533,6 @@ int main(int argc, const char **argv)
*/ */
pthread__block_sigwinch(); pthread__block_sigwinch();
perf_debug_setup();
while (1) { while (1) {
static int done_help; static int done_help;
......
[ [
{ {
"EventCode": "1003C", "EventCode": "0x1003C",
"EventName": "PM_EXEC_STALL_DMISS_L2L3", "EventName": "PM_EXEC_STALL_DMISS_L2L3",
"BriefDescription": "Cycles in which the oldest instruction in the pipeline was waiting for a load miss to resolve from either the local L2 or local L3." "BriefDescription": "Cycles in which the oldest instruction in the pipeline was waiting for a load miss to resolve from either the local L2 or local L3."
}, },
{ {
"EventCode": "34056", "EventCode": "0x1E054",
"EventName": "PM_EXEC_STALL_DMISS_L21_L31",
"BriefDescription": "Cycles in which the oldest instruction in the pipeline was waiting for a load miss to resolve from another core's L2 or L3 on the same chip."
},
{
"EventCode": "0x34054",
"EventName": "PM_EXEC_STALL_DMISS_L2L3_NOCONFLICT",
"BriefDescription": "Cycles in which the oldest instruction in the pipeline was waiting for a load miss to resolve from the local L2 or local L3, without a dispatch conflict."
},
{
"EventCode": "0x34056",
"EventName": "PM_EXEC_STALL_LOAD_FINISH", "EventName": "PM_EXEC_STALL_LOAD_FINISH",
"BriefDescription": "Cycles in which the oldest instruction in the pipeline was finishing a load after its data was reloaded from a data source beyond the local L1; cycles in which the LSU was processing an L1-hit; cycles in which the NTF instruction merged with another load in the LMQ." "BriefDescription": "Cycles in which the oldest instruction in the pipeline was finishing a load after its data was reloaded from a data source beyond the local L1; cycles in which the LSU was processing an L1-hit; cycles in which the NTF instruction merged with another load in the LMQ; cycles in which the NTF instruction is waiting for a data reload for a load miss, but the data comes back with a non-NTF instruction."
}, },
{ {
"EventCode": "3006C", "EventCode": "0x3006C",
"EventName": "PM_RUN_CYC_SMT2_MODE", "EventName": "PM_RUN_CYC_SMT2_MODE",
"BriefDescription": "Cycles when this thread's run latch is set and the core is in SMT2 mode." "BriefDescription": "Cycles when this thread's run latch is set and the core is in SMT2 mode."
}, },
{ {
"EventCode": "300F4", "EventCode": "0x300F4",
"EventName": "PM_RUN_INST_CMPL_CONC", "EventName": "PM_RUN_INST_CMPL_CONC",
"BriefDescription": "PowerPC instructions completed by this thread when all threads in the core had the run-latch set." "BriefDescription": "PowerPC instructions completed by this thread when all threads in the core had the run-latch set."
}, },
{ {
"EventCode": "4C016", "EventCode": "0x4C016",
"EventName": "PM_EXEC_STALL_DMISS_L2L3_CONFLICT", "EventName": "PM_EXEC_STALL_DMISS_L2L3_CONFLICT",
"BriefDescription": "Cycles in which the oldest instruction in the pipeline was waiting for a load miss to resolve from the local L2 or local L3, with a dispatch conflict." "BriefDescription": "Cycles in which the oldest instruction in the pipeline was waiting for a load miss to resolve from the local L2 or local L3, with a dispatch conflict."
}, },
{ {
"EventCode": "4D014", "EventCode": "0x4D014",
"EventName": "PM_EXEC_STALL_LOAD", "EventName": "PM_EXEC_STALL_LOAD",
"BriefDescription": "Cycles in which the oldest instruction in the pipeline was a load instruction executing in the Load Store Unit." "BriefDescription": "Cycles in which the oldest instruction in the pipeline was a load instruction executing in the Load Store Unit."
}, },
{ {
"EventCode": "4D016", "EventCode": "0x4D016",
"EventName": "PM_EXEC_STALL_PTESYNC", "EventName": "PM_EXEC_STALL_PTESYNC",
"BriefDescription": "Cycles in which the oldest instruction in the pipeline was a PTESYNC instruction executing in the Load Store Unit." "BriefDescription": "Cycles in which the oldest instruction in the pipeline was a PTESYNC instruction executing in the Load Store Unit."
}, },
{ {
"EventCode": "401EA", "EventCode": "0x401EA",
"EventName": "PM_THRESH_EXC_128", "EventName": "PM_THRESH_EXC_128",
"BriefDescription": "Threshold counter exceeded a value of 128." "BriefDescription": "Threshold counter exceeded a value of 128."
}, },
{ {
"EventCode": "400F6", "EventCode": "0x400F6",
"EventName": "PM_BR_MPRED_CMPL", "EventName": "PM_BR_MPRED_CMPL",
"BriefDescription": "A mispredicted branch completed. Includes direction and target." "BriefDescription": "A mispredicted branch completed. Includes direction and target."
} }
......
[ [
{ {
"EventCode": "4016E", "EventCode": "0x4016E",
"EventName": "PM_THRESH_NOT_MET", "EventName": "PM_THRESH_NOT_MET",
"BriefDescription": "Threshold counter did not meet threshold." "BriefDescription": "Threshold counter did not meet threshold."
} }
......
[ [
{ {
"EventCode": "1E058", "EventCode": "0x1E058",
"EventName": "PM_STCX_FAIL_FIN", "EventName": "PM_STCX_FAIL_FIN",
"BriefDescription": "Conditional store instruction (STCX) failed. LARX and STCX are instructions used to acquire a lock." "BriefDescription": "Conditional store instruction (STCX) failed. LARX and STCX are instructions used to acquire a lock."
}, },
{ {
"EventCode": "4E050", "EventCode": "0x4E050",
"EventName": "PM_STCX_PASS_FIN", "EventName": "PM_STCX_PASS_FIN",
"BriefDescription": "Conditional store instruction (STCX) passed. LARX and STCX are instructions used to acquire a lock." "BriefDescription": "Conditional store instruction (STCX) passed. LARX and STCX are instructions used to acquire a lock."
} }
......
[ [
{ {
"EventCode": "1002C", "EventCode": "0x1002C",
"EventName": "PM_LD_PREFETCH_CACHE_LINE_MISS", "EventName": "PM_LD_PREFETCH_CACHE_LINE_MISS",
"BriefDescription": "The L1 cache was reloaded with a line that fulfills a prefetch request." "BriefDescription": "The L1 cache was reloaded with a line that fulfills a prefetch request."
}, },
{ {
"EventCode": "10132", "EventCode": "0x10132",
"EventName": "PM_MRK_INST_ISSUED", "EventName": "PM_MRK_INST_ISSUED",
"BriefDescription": "Marked instruction issued. Note that stores always get issued twice, the address gets issued to the LSU and the data gets issued to the VSU. Also, issues can sometimes get killed/cancelled and cause multiple sequential issues for the same instruction." "BriefDescription": "Marked instruction issued. Note that stores always get issued twice, the address gets issued to the LSU and the data gets issued to the VSU. Also, issues can sometimes get killed/cancelled and cause multiple sequential issues for the same instruction."
}, },
{ {
"EventCode": "101E0", "EventCode": "0x101E0",
"EventName": "PM_MRK_INST_DISP", "EventName": "PM_MRK_INST_DISP",
"BriefDescription": "The thread has dispatched a randomly sampled marked instruction." "BriefDescription": "The thread has dispatched a randomly sampled marked instruction."
}, },
{ {
"EventCode": "101E2", "EventCode": "0x101E2",
"EventName": "PM_MRK_BR_TAKEN_CMPL", "EventName": "PM_MRK_BR_TAKEN_CMPL",
"BriefDescription": "Marked Branch Taken instruction completed." "BriefDescription": "Marked Branch Taken instruction completed."
}, },
{ {
"EventCode": "20112", "EventCode": "0x20112",
"EventName": "PM_MRK_NTF_FIN", "EventName": "PM_MRK_NTF_FIN",
"BriefDescription": "The marked instruction became the oldest in the pipeline before it finished. It excludes instructions that finish at dispatch." "BriefDescription": "The marked instruction became the oldest in the pipeline before it finished. It excludes instructions that finish at dispatch."
}, },
{ {
"EventCode": "2C01C", "EventCode": "0x2C01C",
"EventName": "PM_EXEC_STALL_DMISS_OFF_CHIP", "EventName": "PM_EXEC_STALL_DMISS_OFF_CHIP",
"BriefDescription": "Cycles in which the oldest instruction in the pipeline was waiting for a load miss to resolve from a remote chip." "BriefDescription": "Cycles in which the oldest instruction in the pipeline was waiting for a load miss to resolve from a remote chip."
}, },
{ {
"EventCode": "20138", "EventCode": "0x20138",
"EventName": "PM_MRK_ST_NEST", "EventName": "PM_MRK_ST_NEST",
"BriefDescription": "A store has been sampled/marked and is at the point of execution where it has completed in the core and can no longer be flushed. At this point the store is sent to the L2." "BriefDescription": "A store has been sampled/marked and is at the point of execution where it has completed in the core and can no longer be flushed. At this point the store is sent to the L2."
}, },
{ {
"EventCode": "2013A", "EventCode": "0x2013A",
"EventName": "PM_MRK_BRU_FIN", "EventName": "PM_MRK_BRU_FIN",
"BriefDescription": "Marked Branch instruction finished." "BriefDescription": "Marked Branch instruction finished."
}, },
{ {
"EventCode": "2C144", "EventCode": "0x2C144",
"EventName": "PM_MRK_XFER_FROM_SRC_CYC_PMC2", "EventName": "PM_MRK_XFER_FROM_SRC_CYC_PMC2",
"BriefDescription": "Cycles taken for a marked demand miss to reload a line from the source specified in MMCR3[15:27]." "BriefDescription": "Cycles taken for a marked demand miss to reload a line from the source specified in MMCR3[15:27]."
}, },
{ {
"EventCode": "24156", "EventCode": "0x24156",
"EventName": "PM_MRK_STCX_FIN", "EventName": "PM_MRK_STCX_FIN",
"BriefDescription": "Marked conditional store instruction (STCX) finished. LARX and STCX are instructions used to acquire a lock." "BriefDescription": "Marked conditional store instruction (STCX) finished. LARX and STCX are instructions used to acquire a lock."
}, },
{ {
"EventCode": "24158", "EventCode": "0x24158",
"EventName": "PM_MRK_INST", "EventName": "PM_MRK_INST",
"BriefDescription": "An instruction was marked. Includes both Random Instruction Sampling (RIS) at decode time and Random Event Sampling (RES) at the time the configured event happens." "BriefDescription": "An instruction was marked. Includes both Random Instruction Sampling (RIS) at decode time and Random Event Sampling (RES) at the time the configured event happens."
}, },
{ {
"EventCode": "2415C", "EventCode": "0x2415C",
"EventName": "PM_MRK_BR_CMPL", "EventName": "PM_MRK_BR_CMPL",
"BriefDescription": "A marked branch completed. All branches are included." "BriefDescription": "A marked branch completed. All branches are included."
}, },
{ {
"EventCode": "200FD", "EventCode": "0x200FD",
"EventName": "PM_L1_ICACHE_MISS", "EventName": "PM_L1_ICACHE_MISS",
"BriefDescription": "Demand iCache Miss." "BriefDescription": "Demand iCache Miss."
}, },
{ {
"EventCode": "30130", "EventCode": "0x30130",
"EventName": "PM_MRK_INST_FIN", "EventName": "PM_MRK_INST_FIN",
"BriefDescription": "marked instruction finished. Excludes instructions that finish at dispatch. Note that stores always finish twice since the address gets issued to the LSU and the data gets issued to the VSU." "BriefDescription": "marked instruction finished. Excludes instructions that finish at dispatch. Note that stores always finish twice since the address gets issued to the LSU and the data gets issued to the VSU."
}, },
{ {
"EventCode": "34146", "EventCode": "0x34146",
"EventName": "PM_MRK_LD_CMPL", "EventName": "PM_MRK_LD_CMPL",
"BriefDescription": "Marked loads completed." "BriefDescription": "Marked loads completed."
}, },
{ {
"EventCode": "3E158", "EventCode": "0x3E158",
"EventName": "PM_MRK_STCX_FAIL", "EventName": "PM_MRK_STCX_FAIL",
"BriefDescription": "Marked conditional store instruction (STCX) failed. LARX and STCX are instructions used to acquire a lock." "BriefDescription": "Marked conditional store instruction (STCX) failed. LARX and STCX are instructions used to acquire a lock."
}, },
{ {
"EventCode": "3E15A", "EventCode": "0x3E15A",
"EventName": "PM_MRK_ST_FIN", "EventName": "PM_MRK_ST_FIN",
"BriefDescription": "The marked instruction was a store of any kind." "BriefDescription": "The marked instruction was a store of any kind."
}, },
{ {
"EventCode": "30068", "EventCode": "0x30068",
"EventName": "PM_L1_ICACHE_RELOADED_PREF", "EventName": "PM_L1_ICACHE_RELOADED_PREF",
"BriefDescription": "Counts all Icache prefetch reloads ( includes demand turned into prefetch)." "BriefDescription": "Counts all Icache prefetch reloads ( includes demand turned into prefetch)."
}, },
{ {
"EventCode": "301E4", "EventCode": "0x301E4",
"EventName": "PM_MRK_BR_MPRED_CMPL", "EventName": "PM_MRK_BR_MPRED_CMPL",
"BriefDescription": "Marked Branch Mispredicted. Includes direction and target." "BriefDescription": "Marked Branch Mispredicted. Includes direction and target."
}, },
{ {
"EventCode": "300F6", "EventCode": "0x300F6",
"EventName": "PM_LD_DEMAND_MISS_L1", "EventName": "PM_LD_DEMAND_MISS_L1",
"BriefDescription": "The L1 cache was reloaded with a line that fulfills a demand miss request. Counted at reload time, before finish." "BriefDescription": "The L1 cache was reloaded with a line that fulfills a demand miss request. Counted at reload time, before finish."
}, },
{ {
"EventCode": "300FE", "EventCode": "0x300FE",
"EventName": "PM_DATA_FROM_L3MISS", "EventName": "PM_DATA_FROM_L3MISS",
"BriefDescription": "The processor's data cache was reloaded from a source other than the local core's L1, L2, or L3 due to a demand miss." "BriefDescription": "The processor's data cache was reloaded from a source other than the local core's L1, L2, or L3 due to a demand miss."
}, },
{ {
"EventCode": "40012", "EventCode": "0x40012",
"EventName": "PM_L1_ICACHE_RELOADED_ALL", "EventName": "PM_L1_ICACHE_RELOADED_ALL",
"BriefDescription": "Counts all Icache reloads includes demand, prefetch, prefetch turned into demand and demand turned into prefetch." "BriefDescription": "Counts all Icache reloads includes demand, prefetch, prefetch turned into demand and demand turned into prefetch."
}, },
{ {
"EventCode": "40134", "EventCode": "0x40134",
"EventName": "PM_MRK_INST_TIMEO", "EventName": "PM_MRK_INST_TIMEO",
"BriefDescription": "Marked instruction finish timeout (instruction was lost)." "BriefDescription": "Marked instruction finish timeout (instruction was lost)."
}, },
{ {
"EventCode": "4003C", "EventCode": "0x4505A",
"EventName": "PM_DISP_STALL_HELD_SYNC_CYC",
"BriefDescription": "Cycles in which the NTC instruction is held at dispatch because of a synchronizing instruction that requires the ICT to be empty before dispatch."
},
{
"EventCode": "4505A",
"EventName": "PM_SP_FLOP_CMPL", "EventName": "PM_SP_FLOP_CMPL",
"BriefDescription": "Single Precision floating point instructions completed." "BriefDescription": "Single Precision floating point instructions completed."
}, },
{ {
"EventCode": "4D058", "EventCode": "0x4D058",
"EventName": "PM_VECTOR_FLOP_CMPL", "EventName": "PM_VECTOR_FLOP_CMPL",
"BriefDescription": "Vector floating point instructions completed." "BriefDescription": "Vector floating point instructions completed."
}, },
{ {
"EventCode": "4D05A", "EventCode": "0x4D05A",
"EventName": "PM_NON_MATH_FLOP_CMPL", "EventName": "PM_NON_MATH_FLOP_CMPL",
"BriefDescription": "Non Math instructions completed." "BriefDescription": "Non Math instructions completed."
}, },
{ {
"EventCode": "401E0", "EventCode": "0x401E0",
"EventName": "PM_MRK_INST_CMPL", "EventName": "PM_MRK_INST_CMPL",
"BriefDescription": "marked instruction completed." "BriefDescription": "marked instruction completed."
}, },
{ {
"EventCode": "400FE", "EventCode": "0x400FE",
"EventName": "PM_DATA_FROM_MEMORY", "EventName": "PM_DATA_FROM_MEMORY",
"BriefDescription": "The processor's data cache was reloaded from local, remote, or distant memory due to a demand miss." "BriefDescription": "The processor's data cache was reloaded from local, remote, or distant memory due to a demand miss."
} }
......
[ [
{ {
"EventCode": "301E8", "EventCode": "0x301E8",
"EventName": "PM_THRESH_EXC_64", "EventName": "PM_THRESH_EXC_64",
"BriefDescription": "Threshold counter exceeded a value of 64." "BriefDescription": "Threshold counter exceeded a value of 64."
}, },
{ {
"EventCode": "45050", "EventCode": "0x45050",
"EventName": "PM_1FLOP_CMPL", "EventName": "PM_1FLOP_CMPL",
"BriefDescription": "One floating point instruction completed (fadd, fmul, fsub, fcmp, fsel, fabs, fnabs, fres, fsqrte, fneg)." "BriefDescription": "One floating point instruction completed (fadd, fmul, fsub, fcmp, fsel, fabs, fnabs, fres, fsqrte, fneg)."
}, },
{ {
"EventCode": "45052", "EventCode": "0x45052",
"EventName": "PM_4FLOP_CMPL", "EventName": "PM_4FLOP_CMPL",
"BriefDescription": "Four floating point instructions completed (fadd, fmul, fsub, fcmp, fsel, fabs, fnabs, fres, fsqrte, fneg)." "BriefDescription": "Four floating point instructions completed (fadd, fmul, fsub, fcmp, fsel, fabs, fnabs, fres, fsqrte, fneg)."
}, },
{ {
"EventCode": "4D054", "EventCode": "0x4D054",
"EventName": "PM_8FLOP_CMPL", "EventName": "PM_8FLOP_CMPL",
"BriefDescription": "Four Double Precision vector instructions completed." "BriefDescription": "Four Double Precision vector instructions completed."
} }
......
[ [
{ {
"EventCode": "1F15E", "EventCode": "0x1F15E",
"EventName": "PM_MRK_START_PROBE_NOP_CMPL", "EventName": "PM_MRK_START_PROBE_NOP_CMPL",
"BriefDescription": "Marked Start probe nop (AND R0,R0,R0) completed." "BriefDescription": "Marked Start probe nop (AND R0,R0,R0) completed."
}, },
{ {
"EventCode": "20016", "EventCode": "0x20016",
"EventName": "PM_ST_FIN", "EventName": "PM_ST_FIN",
"BriefDescription": "Store finish count. Includes speculative activity." "BriefDescription": "Store finish count. Includes speculative activity."
}, },
{ {
"EventCode": "20018", "EventCode": "0x20018",
"EventName": "PM_ST_FWD", "EventName": "PM_ST_FWD",
"BriefDescription": "Store forwards that finished." "BriefDescription": "Store forwards that finished."
}, },
{ {
"EventCode": "2011C", "EventCode": "0x2011C",
"EventName": "PM_MRK_NTF_CYC", "EventName": "PM_MRK_NTF_CYC",
"BriefDescription": "Cycles during which the marked instruction is the oldest in the pipeline (NTF or NTC)." "BriefDescription": "Cycles during which the marked instruction is the oldest in the pipeline (NTF or NTC)."
}, },
{ {
"EventCode": "2E01C", "EventCode": "0x2E01C",
"EventName": "PM_EXEC_STALL_TLBIE", "EventName": "PM_EXEC_STALL_TLBIE",
"BriefDescription": "Cycles in which the oldest instruction in the pipeline was a TLBIE instruction executing in the Load Store Unit." "BriefDescription": "Cycles in which the oldest instruction in the pipeline was a TLBIE instruction executing in the Load Store Unit."
}, },
{ {
"EventCode": "201E6", "EventCode": "0x201E6",
"EventName": "PM_THRESH_EXC_32", "EventName": "PM_THRESH_EXC_32",
"BriefDescription": "Threshold counter exceeded a value of 32." "BriefDescription": "Threshold counter exceeded a value of 32."
}, },
{ {
"EventCode": "200F0", "EventCode": "0x200F0",
"EventName": "PM_ST_CMPL", "EventName": "PM_ST_CMPL",
"BriefDescription": "Stores completed from S2Q (2nd-level store queue). This event includes regular stores, stcx and cache inhibited stores. The following operations are excluded (pteupdate, snoop tlbie complete, store atomics, miso, load atomic payloads, tlbie, tlbsync, slbieg, isync, msgsnd, slbiag, cpabort, copy, tcheck, tend, stsync, dcbst, icbi, dcbf, hwsync, lwsync, ptesync, eieio, msgsync)." "BriefDescription": "Stores completed from S2Q (2nd-level store queue). This event includes regular stores, stcx and cache inhibited stores. The following operations are excluded (pteupdate, snoop tlbie complete, store atomics, miso, load atomic payloads, tlbie, tlbsync, slbieg, isync, msgsnd, slbiag, cpabort, copy, tcheck, tend, stsync, dcbst, icbi, dcbf, hwsync, lwsync, ptesync, eieio, msgsync)."
}, },
{ {
"EventCode": "200FE", "EventCode": "0x200FE",
"EventName": "PM_DATA_FROM_L2MISS", "EventName": "PM_DATA_FROM_L2MISS",
"BriefDescription": "The processor's data cache was reloaded from a source other than the local core's L1 or L2 due to a demand miss." "BriefDescription": "The processor's data cache was reloaded from a source other than the local core's L1 or L2 due to a demand miss."
}, },
{ {
"EventCode": "30010", "EventCode": "0x30010",
"EventName": "PM_PMC2_OVERFLOW", "EventName": "PM_PMC2_OVERFLOW",
"BriefDescription": "The event selected for PMC2 caused the event counter to overflow." "BriefDescription": "The event selected for PMC2 caused the event counter to overflow."
}, },
{ {
"EventCode": "4D010", "EventCode": "0x4D010",
"EventName": "PM_PMC1_SAVED", "EventName": "PM_PMC1_SAVED",
"BriefDescription": "The conditions for the speculative event selected for PMC1 are met and PMC1 is charged." "BriefDescription": "The conditions for the speculative event selected for PMC1 are met and PMC1 is charged."
}, },
{ {
"EventCode": "4D05C", "EventCode": "0x4D05C",
"EventName": "PM_DPP_FLOP_CMPL", "EventName": "PM_DPP_FLOP_CMPL",
"BriefDescription": "Double-Precision or Quad-Precision instructions completed." "BriefDescription": "Double-Precision or Quad-Precision instructions completed."
} }
......
...@@ -960,7 +960,7 @@ static int get_maxfds(void) ...@@ -960,7 +960,7 @@ static int get_maxfds(void)
struct rlimit rlim; struct rlimit rlim;
if (getrlimit(RLIMIT_NOFILE, &rlim) == 0) if (getrlimit(RLIMIT_NOFILE, &rlim) == 0)
return min((int)rlim.rlim_max / 2, 512); return min(rlim.rlim_max / 2, (rlim_t)512);
return 512; return 512;
} }
......
...@@ -451,10 +451,10 @@ static int bperf_reload_leader_program(struct evsel *evsel, int attr_map_fd, ...@@ -451,10 +451,10 @@ static int bperf_reload_leader_program(struct evsel *evsel, int attr_map_fd,
goto out; goto out;
} }
err = -1;
link = bpf_program__attach(skel->progs.on_switch); link = bpf_program__attach(skel->progs.on_switch);
if (!link) { if (IS_ERR(link)) {
pr_err("Failed to attach leader program\n"); pr_err("Failed to attach leader program\n");
err = PTR_ERR(link);
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment