perf/core improvements and fixes:

User visible:
 
 - Add missing number of samples in 'perf annotate --stdio -l --show-total-period'
   (Taeung Song)
 
 Vendor events updates:
 
 - Add uncore_arb Intel vendor events in JSON format (Andi Kleen)
 
 - Add uncore vendor events for Intel's Sandy Bridge, Ivy Bridge,
   Haswell, Broadwell and Skylake architectures (Andi Kleen)
 
 - Add missing UNC_M_DCLOCKTICKS Intel Broadwell DE uncore vendor event (Andi Kleen)
 
 Infrastructure:
 
 - Remove some more die() calls, avoiding sudden death in library code
   (Arnaldo Carvalho de Melo)
 
 - Add argument support for SDT events in powerpc (Ravi Bangoria)
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJY5Da/AAoJENZQFvNTUqpApG0P/jt4ZhAvCWGek/9aspP9mecc
 afb84XMvdxiZ/54fFNbch9AbX2I9F6q0HUpfb5nlrd78wjU7mb1ZLL3nT3ChEqZ1
 2WYUU+INMalxvMRDnvheT4fR3ZGJtOfhn5vCWTO8IWfAzBPEkcVzNvwbKgKbur5u
 FImUcN4+bMuZOrpawiPgQahrsRAjkwjoBgCtPXLy5OZJAU2SFwHZla5eTapFFu7S
 7W3AK55Wod/EV1PLd9SURcvqV1lGZNa4Bzo2yw12NyOp/U8vT1h3N8DxZJuju9RJ
 1CdQAssv1EcH5pAB8Q3WXkqTynphioivvdXdzKn9pgUSHCUSd19EtquzK1nH2T04
 Hu8Yn//3zdvpdmg1prz4oifQMDP18YdkOY0n+9OwT5KK+3HPY7Ii9W5Fw+DkPNfw
 JivJqfkra/H8BvShYhmQ4qLcPoNAb9kBrZI+ZPnjsJHl3ktmn3RtpdwPlUAwPb2/
 OcAnHcQQASAxAW/iDRTZaC8GkSfi6F61hMlTy+ryNl7Adp+1tELStPaKqTo3CRXQ
 HsrBQPwPH1fIdvtgk+kd7bfsjbMeOYu0t/moWfWwzu4AbrUcEFbpfZxH7fYChjdz
 pmYqYsXigwlNIA0ATgSkxVVtSxbUyrgpzgl+IFaRx5sM0GUt3MABdG6bjH1tupdg
 yCC1g/SEVE3EFvcZGrUW
 =vSTJ
 -----END PGP SIGNATURE-----

Merge tag 'perf-core-for-mingo-4.12-20170404' 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:

User visible changes:

- Add missing number of samples in 'perf annotate --stdio -l --show-total-period'
  (Taeung Song)

Vendor events updates:

- Add uncore_arb Intel vendor events in JSON format (Andi Kleen)

- Add uncore vendor events for Intel's Sandy Bridge, Ivy Bridge,
  Haswell, Broadwell and Skylake architectures (Andi Kleen)

- Add missing UNC_M_DCLOCKTICKS Intel Broadwell DE uncore vendor event (Andi Kleen)

Infrastructure changes:

- Remove some more die() calls, avoiding sudden death in library code
  (Arnaldo Carvalho de Melo)

- Add argument support for SDT events in powerpc (Ravi Bangoria)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Ingo Molnar 2017-04-05 07:40:16 +02:00
commit 11e445e9b4
12 changed files with 1710 additions and 24 deletions

View File

@ -1,5 +1,10 @@
#include <string.h>
#include <regex.h>
#include "../../perf.h"
#include "../../util/util.h"
#include "../../util/perf_regs.h"
#include "../../util/debug.h"
const struct sample_reg sample_reg_masks[] = {
SMPL_REG(r0, PERF_REG_POWERPC_R0),
@ -47,3 +52,109 @@ const struct sample_reg sample_reg_masks[] = {
SMPL_REG(dsisr, PERF_REG_POWERPC_DSISR),
SMPL_REG_END
};
/* REG or %rREG */
#define SDT_OP_REGEX1 "^(%r)?([1-2]?[0-9]|3[0-1])$"
/* -NUM(REG) or NUM(REG) or -NUM(%rREG) or NUM(%rREG) */
#define SDT_OP_REGEX2 "^(\\-)?([0-9]+)\\((%r)?([1-2]?[0-9]|3[0-1])\\)$"
static regex_t sdt_op_regex1, sdt_op_regex2;
static int sdt_init_op_regex(void)
{
static int initialized;
int ret = 0;
if (initialized)
return 0;
ret = regcomp(&sdt_op_regex1, SDT_OP_REGEX1, REG_EXTENDED);
if (ret)
goto error;
ret = regcomp(&sdt_op_regex2, SDT_OP_REGEX2, REG_EXTENDED);
if (ret)
goto free_regex1;
initialized = 1;
return 0;
free_regex1:
regfree(&sdt_op_regex1);
error:
pr_debug4("Regex compilation error.\n");
return ret;
}
/*
* Parse OP and convert it into uprobe format, which is, +/-NUM(%gprREG).
* Possible variants of OP are:
* Format Example
* -------------------------
* NUM(REG) 48(18)
* -NUM(REG) -48(18)
* NUM(%rREG) 48(%r18)
* -NUM(%rREG) -48(%r18)
* REG 18
* %rREG %r18
* iNUM i0
* i-NUM i-1
*
* SDT marker arguments on Powerpc uses %rREG form with -mregnames flag
* and REG form with -mno-regnames. Here REG is general purpose register,
* which is in 0 to 31 range.
*/
int arch_sdt_arg_parse_op(char *old_op, char **new_op)
{
int ret, new_len;
regmatch_t rm[5];
char prefix;
/* Constant argument. Uprobe does not support it */
if (old_op[0] == 'i') {
pr_debug4("Skipping unsupported SDT argument: %s\n", old_op);
return SDT_ARG_SKIP;
}
ret = sdt_init_op_regex();
if (ret < 0)
return ret;
if (!regexec(&sdt_op_regex1, old_op, 3, rm, 0)) {
/* REG or %rREG --> %gprREG */
new_len = 5; /* % g p r NULL */
new_len += (int)(rm[2].rm_eo - rm[2].rm_so);
*new_op = zalloc(new_len);
if (!*new_op)
return -ENOMEM;
scnprintf(*new_op, new_len, "%%gpr%.*s",
(int)(rm[2].rm_eo - rm[2].rm_so), old_op + rm[2].rm_so);
} else if (!regexec(&sdt_op_regex2, old_op, 5, rm, 0)) {
/*
* -NUM(REG) or NUM(REG) or -NUM(%rREG) or NUM(%rREG) -->
* +/-NUM(%gprREG)
*/
prefix = (rm[1].rm_so == -1) ? '+' : '-';
new_len = 8; /* +/- ( % g p r ) NULL */
new_len += (int)(rm[2].rm_eo - rm[2].rm_so);
new_len += (int)(rm[4].rm_eo - rm[4].rm_so);
*new_op = zalloc(new_len);
if (!*new_op)
return -ENOMEM;
scnprintf(*new_op, new_len, "%c%.*s(%%gpr%.*s)", prefix,
(int)(rm[2].rm_eo - rm[2].rm_so), old_op + rm[2].rm_so,
(int)(rm[4].rm_eo - rm[4].rm_so), old_op + rm[4].rm_so);
} else {
pr_debug4("Skipping unsupported SDT argument: %s\n", old_op);
return SDT_ARG_SKIP;
}
return SDT_ARG_VALID;
}

View File

@ -378,7 +378,8 @@ static void execv_dashed_external(const char **argv)
if (status != -ERR_RUN_COMMAND_EXEC) {
if (IS_RUN_COMMAND_ERR(status)) {
do_die:
die("unable to run '%s'", argv[0]);
pr_err("FATAL: unable to run '%s'", argv[0]);
status = -128;
}
exit(-status);
}

View File

@ -0,0 +1,278 @@
[
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x41",
"EventName": "UNC_CBO_XSNP_RESPONSE.MISS_XCORE",
"BriefDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which misses in some processor core.",
"PublicDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which misses in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x81",
"EventName": "UNC_CBO_XSNP_RESPONSE.MISS_EVICTION",
"BriefDescription": "A cross-core snoop resulted from L3 Eviction which misses in some processor core.",
"PublicDescription": "A cross-core snoop resulted from L3 Eviction which misses in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x44",
"EventName": "UNC_CBO_XSNP_RESPONSE.HIT_XCORE",
"BriefDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which hits a non-modified line in some processor core.",
"PublicDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which hits a non-modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x48",
"EventName": "UNC_CBO_XSNP_RESPONSE.HITM_XCORE",
"BriefDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which hits a modified line in some processor core.",
"PublicDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which hits a modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x11",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_M",
"BriefDescription": "L3 Lookup read request that access cache and found line in M-state",
"PublicDescription": "L3 Lookup read request that access cache and found line in M-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x21",
"EventName": "UNC_CBO_CACHE_LOOKUP.WRITE_M",
"BriefDescription": "L3 Lookup write request that access cache and found line in M-state",
"PublicDescription": "L3 Lookup write request that access cache and found line in M-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x81",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_M",
"BriefDescription": "L3 Lookup any request that access cache and found line in M-state",
"PublicDescription": "L3 Lookup any request that access cache and found line in M-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x18",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_I",
"BriefDescription": "L3 Lookup read request that access cache and found line in I-state",
"PublicDescription": "L3 Lookup read request that access cache and found line in I-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x88",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_I",
"BriefDescription": "L3 Lookup any request that access cache and found line in I-state",
"PublicDescription": "L3 Lookup any request that access cache and found line in I-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x1f",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_MESI",
"BriefDescription": "L3 Lookup read request that access cache and found line in any MESI-state",
"PublicDescription": "L3 Lookup read request that access cache and found line in any MESI-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x2f",
"EventName": "UNC_CBO_CACHE_LOOKUP.WRITE_MESI",
"BriefDescription": "L3 Lookup write request that access cache and found line in MESI-state",
"PublicDescription": "L3 Lookup write request that access cache and found line in MESI-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x8f",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_MESI",
"BriefDescription": "L3 Lookup any request that access cache and found line in MESI-state",
"PublicDescription": "L3 Lookup any request that access cache and found line in MESI-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x86",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_ES",
"BriefDescription": "L3 Lookup any request that access cache and found line in E or S-state",
"PublicDescription": "L3 Lookup any request that access cache and found line in E or S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x16",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_ES",
"BriefDescription": "L3 Lookup read request that access cache and found line in E or S-state",
"PublicDescription": "L3 Lookup read request that access cache and found line in E or S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x26",
"EventName": "UNC_CBO_CACHE_LOOKUP.WRITE_ES",
"BriefDescription": "L3 Lookup write request that access cache and found line in E or S-state",
"PublicDescription": "L3 Lookup write request that access cache and found line in E or S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x80",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_OCCUPANCY.ALL",
"BriefDescription": "Each cycle count number of all Core outgoing valid entries. Such entry is defined as valid from it's allocation till first of IDI0 or DRS0 messages is sent out. Accounts for Coherent and non-coherent traffic.",
"PublicDescription": "Each cycle count number of all Core outgoing valid entries. Such entry is defined as valid from it's allocation till first of IDI0 or DRS0 messages is sent out. Accounts for Coherent and non-coherent traffic.",
"Counter": "0,",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x80",
"UMask": "0x02",
"EventName": "UNC_ARB_TRK_OCCUPANCY.DRD_DIRECT",
"BriefDescription": "Each cycle count number of 'valid' coherent Data Read entries that are in DirectData mode. Such entry is defined as valid when it is allocated till data sent to Core (first chunk, IDI0). Applicable for IA Cores' requests in normal case.",
"PublicDescription": "Each cycle count number of 'valid' coherent Data Read entries that are in DirectData mode. Such entry is defined as valid when it is allocated till data sent to Core (first chunk, IDI0). Applicable for IA Cores' requests in normal case.",
"Counter": "0,",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x81",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_REQUESTS.ALL",
"BriefDescription": "Total number of Core outgoing entries allocated. Accounts for Coherent and non-coherent traffic.",
"PublicDescription": "Total number of Core outgoing entries allocated. Accounts for Coherent and non-coherent traffic.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x81",
"UMask": "0x02",
"EventName": "UNC_ARB_TRK_REQUESTS.DRD_DIRECT",
"BriefDescription": "Number of Core coherent Data Read entries allocated in DirectData mode",
"PublicDescription": "Number of Core coherent Data Read entries allocated in DirectData mode.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x81",
"UMask": "0x20",
"EventName": "UNC_ARB_TRK_REQUESTS.WRITES",
"BriefDescription": "Number of Writes allocated - any write transactions: full/partials writes and evictions.",
"PublicDescription": "Number of Writes allocated - any write transactions: full/partials writes and evictions.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x84",
"UMask": "0x01",
"EventName": "UNC_ARB_COH_TRK_REQUESTS.ALL",
"BriefDescription": "Number of entries allocated. Account for Any type: e.g. Snoop, Core aperture, etc.",
"PublicDescription": "Number of entries allocated. Account for Any type: e.g. Snoop, Core aperture, etc.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x80",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_OCCUPANCY.CYCLES_WITH_ANY_REQUEST",
"BriefDescription": "Cycles with at least one request outstanding is waiting for data return from memory controller. Account for coherent and non-coherent requests initiated by IA Cores, Processor Graphics Unit, or LLC.;",
"PublicDescription": "Cycles with at least one request outstanding is waiting for data return from memory controller. Account for coherent and non-coherent requests initiated by IA Cores, Processor Graphics Unit, or LLC.",
"Counter": "0,",
"CounterMask": "1",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "NCU",
"EventCode": "0x0",
"UMask": "0x01",
"EventName": "UNC_CLOCK.SOCKET",
"BriefDescription": "This 48-bit fixed counter counts the UCLK cycles",
"PublicDescription": "This 48-bit fixed counter counts the UCLK cycles.",
"Counter": "FIXED",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
}
]

View File

@ -19,12 +19,19 @@
"UMask": "0xC",
"Unit": "iMC"
},
{
"BriefDescription": "Memory controller clock ticks",
"Counter": "0,1,2,3",
"EventName": "UNC_M_DCLOCKTICKS",
"PerPkg": "1",
"Unit": "iMC"
},
{
"BriefDescription": "Cycles where DRAM ranks are in power down (CKE) mode",
"Counter": "0,1,2,3",
"EventCode": "0x85",
"EventName": "UNC_M_POWER_CHANNEL_PPD",
"MetricExpr": "(UNC_M_POWER_CHANNEL_PPD / UNC_M_CLOCKTICKS) * 100.",
"MetricExpr": "(UNC_M_POWER_CHANNEL_PPD / UNC_M_DCLOCKTICKS) * 100.",
"MetricName": "power_channel_ppd %",
"PerPkg": "1",
"Unit": "iMC"
@ -34,7 +41,7 @@
"Counter": "0,1,2,3",
"EventCode": "0x86",
"EventName": "UNC_M_POWER_CRITICAL_THROTTLE_CYCLES",
"MetricExpr": "(UNC_M_POWER_CRITICAL_THROTTLE_CYCLES / UNC_M_CLOCKTICKS) * 100.",
"MetricExpr": "(UNC_M_POWER_CRITICAL_THROTTLE_CYCLES / UNC_M_DCLOCKTICKS) * 100.",
"MetricName": "power_critical_throttle_cycles %",
"PerPkg": "1",
"Unit": "iMC"
@ -44,7 +51,7 @@
"Counter": "0,1,2,3",
"EventCode": "0x43",
"EventName": "UNC_M_POWER_SELF_REFRESH",
"MetricExpr": "(UNC_M_POWER_SELF_REFRESH / UNC_M_CLOCKTICKS) * 100.",
"MetricExpr": "(UNC_M_POWER_SELF_REFRESH / UNC_M_DCLOCKTICKS) * 100.",
"MetricName": "power_self_refresh %",
"PerPkg": "1",
"Unit": "iMC"

View File

@ -0,0 +1,374 @@
[
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x21",
"EventName": "UNC_CBO_XSNP_RESPONSE.MISS_EXTERNAL",
"BriefDescription": "An external snoop misses in some processor core.",
"PublicDescription": "An external snoop misses in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x41",
"EventName": "UNC_CBO_XSNP_RESPONSE.MISS_XCORE",
"BriefDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which misses in some processor core.",
"PublicDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which misses in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x81",
"EventName": "UNC_CBO_XSNP_RESPONSE.MISS_EVICTION",
"BriefDescription": "A cross-core snoop resulted from L3 Eviction which misses in some processor core.",
"PublicDescription": "A cross-core snoop resulted from L3 Eviction which misses in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x24",
"EventName": "UNC_CBO_XSNP_RESPONSE.HIT_EXTERNAL",
"BriefDescription": "An external snoop hits a non-modified line in some processor core.",
"PublicDescription": "An external snoop hits a non-modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x44",
"EventName": "UNC_CBO_XSNP_RESPONSE.HIT_XCORE",
"BriefDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which hits a non-modified line in some processor core.",
"PublicDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which hits a non-modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x84",
"EventName": "UNC_CBO_XSNP_RESPONSE.HIT_EVICTION",
"BriefDescription": "A cross-core snoop resulted from L3 Eviction which hits a non-modified line in some processor core.",
"PublicDescription": "A cross-core snoop resulted from L3 Eviction which hits a non-modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x28",
"EventName": "UNC_CBO_XSNP_RESPONSE.HITM_EXTERNAL",
"BriefDescription": "An external snoop hits a modified line in some processor core.",
"PublicDescription": "An external snoop hits a modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x48",
"EventName": "UNC_CBO_XSNP_RESPONSE.HITM_XCORE",
"BriefDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which hits a modified line in some processor core.",
"PublicDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which hits a modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x88",
"EventName": "UNC_CBO_XSNP_RESPONSE.HITM_EVICTION",
"BriefDescription": "A cross-core snoop resulted from L3 Eviction which hits a modified line in some processor core.",
"PublicDescription": "A cross-core snoop resulted from L3 Eviction which hits a modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x11",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_M",
"BriefDescription": "L3 Lookup read request that access cache and found line in M-state.",
"PublicDescription": "L3 Lookup read request that access cache and found line in M-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x21",
"EventName": "UNC_CBO_CACHE_LOOKUP.WRITE_M",
"BriefDescription": "L3 Lookup write request that access cache and found line in M-state.",
"PublicDescription": "L3 Lookup write request that access cache and found line in M-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x41",
"EventName": "UNC_CBO_CACHE_LOOKUP.EXTSNP_M",
"BriefDescription": "L3 Lookup external snoop request that access cache and found line in M-state.",
"PublicDescription": "L3 Lookup external snoop request that access cache and found line in M-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x81",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_M",
"BriefDescription": "L3 Lookup any request that access cache and found line in M-state.",
"PublicDescription": "L3 Lookup any request that access cache and found line in M-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x18",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_I",
"BriefDescription": "L3 Lookup read request that access cache and found line in I-state.",
"PublicDescription": "L3 Lookup read request that access cache and found line in I-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x28",
"EventName": "UNC_CBO_CACHE_LOOKUP.WRITE_I",
"BriefDescription": "L3 Lookup write request that access cache and found line in I-state.",
"PublicDescription": "L3 Lookup write request that access cache and found line in I-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x48",
"EventName": "UNC_CBO_CACHE_LOOKUP.EXTSNP_I",
"BriefDescription": "L3 Lookup external snoop request that access cache and found line in I-state.",
"PublicDescription": "L3 Lookup external snoop request that access cache and found line in I-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x88",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_I",
"BriefDescription": "L3 Lookup any request that access cache and found line in I-state.",
"PublicDescription": "L3 Lookup any request that access cache and found line in I-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x1f",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_MESI",
"BriefDescription": "L3 Lookup read request that access cache and found line in any MESI-state.",
"PublicDescription": "L3 Lookup read request that access cache and found line in any MESI-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x2f",
"EventName": "UNC_CBO_CACHE_LOOKUP.WRITE_MESI",
"BriefDescription": "L3 Lookup write request that access cache and found line in MESI-state.",
"PublicDescription": "L3 Lookup write request that access cache and found line in MESI-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x4f",
"EventName": "UNC_CBO_CACHE_LOOKUP.EXTSNP_MESI",
"BriefDescription": "L3 Lookup external snoop request that access cache and found line in MESI-state.",
"PublicDescription": "L3 Lookup external snoop request that access cache and found line in MESI-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x8f",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_MESI",
"BriefDescription": "L3 Lookup any request that access cache and found line in MESI-state.",
"PublicDescription": "L3 Lookup any request that access cache and found line in MESI-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x86",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_ES",
"BriefDescription": "L3 Lookup any request that access cache and found line in E or S-state.",
"PublicDescription": "L3 Lookup any request that access cache and found line in E or S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x46",
"EventName": "UNC_CBO_CACHE_LOOKUP.EXTSNP_ES",
"BriefDescription": "L3 Lookup external snoop request that access cache and found line in E or S-state.",
"PublicDescription": "L3 Lookup external snoop request that access cache and found line in E or S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x16",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_ES",
"BriefDescription": "L3 Lookup read request that access cache and found line in E or S-state.",
"PublicDescription": "L3 Lookup read request that access cache and found line in E or S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x26",
"EventName": "UNC_CBO_CACHE_LOOKUP.WRITE_ES",
"BriefDescription": "L3 Lookup write request that access cache and found line in E or S-state.",
"PublicDescription": "L3 Lookup write request that access cache and found line in E or S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x80",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_OCCUPANCY.ALL",
"BriefDescription": "Each cycle count number of all Core outgoing valid entries. Such entry is defined as valid from it's allocation till first of IDI0 or DRS0 messages is sent out. Accounts for Coherent and non-coherent traffic.",
"PublicDescription": "Each cycle count number of all Core outgoing valid entries. Such entry is defined as valid from it's allocation till first of IDI0 or DRS0 messages is sent out. Accounts for Coherent and non-coherent traffic.",
"Counter": "0",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x81",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_REQUESTS.ALL",
"BriefDescription": "Total number of Core outgoing entries allocated. Accounts for Coherent and non-coherent traffic.",
"PublicDescription": "Total number of Core outgoing entries allocated. Accounts for Coherent and non-coherent traffic.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x81",
"UMask": "0x20",
"EventName": "UNC_ARB_TRK_REQUESTS.WRITES",
"BriefDescription": "Number of Writes allocated - any write transactions: full/partials writes and evictions.",
"PublicDescription": "Number of Writes allocated - any write transactions: full/partials writes and evictions.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x83",
"UMask": "0x01",
"EventName": "UNC_ARB_COH_TRK_OCCUPANCY.All",
"BriefDescription": "Each cycle count number of valid entries in Coherency Tracker queue from allocation till deallocation. Aperture requests (snoops) appear as NC decoded internally and become coherent (snoop L3, access memory)",
"PublicDescription": "Each cycle count number of valid entries in Coherency Tracker queue from allocation till deallocation. Aperture requests (snoops) appear as NC decoded internally and become coherent (snoop L3, access memory).",
"Counter": "0",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x84",
"UMask": "0x01",
"EventName": "UNC_ARB_COH_TRK_REQUESTS.ALL",
"BriefDescription": "Number of entries allocated. Account for Any type: e.g. Snoop, Core aperture, etc.",
"PublicDescription": "Number of entries allocated. Account for Any type: e.g. Snoop, Core aperture, etc.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "NCU",
"EventCode": "0x0",
"UMask": "0x01",
"EventName": "UNC_CLOCK.SOCKET",
"BriefDescription": "This 48-bit fixed counter counts the UCLK cycles.",
"PublicDescription": "This 48-bit fixed counter counts the UCLK cycles.",
"Counter": "FIXED",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
}
]

View File

@ -0,0 +1,314 @@
[
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x01",
"EventName": "UNC_CBO_XSNP_RESPONSE.MISS",
"BriefDescription": "A snoop misses in some processor core.",
"PublicDescription": "A snoop misses in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x02",
"EventName": "UNC_CBO_XSNP_RESPONSE.INVAL",
"BriefDescription": "A snoop invalidates a non-modified line in some processor core.",
"PublicDescription": "A snoop invalidates a non-modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x04",
"EventName": "UNC_CBO_XSNP_RESPONSE.HIT",
"BriefDescription": "A snoop hits a non-modified line in some processor core.",
"PublicDescription": "A snoop hits a non-modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x08",
"EventName": "UNC_CBO_XSNP_RESPONSE.HITM",
"BriefDescription": "A snoop hits a modified line in some processor core.",
"PublicDescription": "A snoop hits a modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x10",
"EventName": "UNC_CBO_XSNP_RESPONSE.INVAL_M",
"BriefDescription": "A snoop invalidates a modified line in some processor core.",
"PublicDescription": "A snoop invalidates a modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x20",
"EventName": "UNC_CBO_XSNP_RESPONSE.EXTERNAL_FILTER",
"BriefDescription": "Filter on cross-core snoops initiated by this Cbox due to external snoop request.",
"PublicDescription": "Filter on cross-core snoops initiated by this Cbox due to external snoop request.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x40",
"EventName": "UNC_CBO_XSNP_RESPONSE.XCORE_FILTER",
"BriefDescription": "Filter on cross-core snoops initiated by this Cbox due to processor core memory request.",
"PublicDescription": "Filter on cross-core snoops initiated by this Cbox due to processor core memory request.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x80",
"EventName": "UNC_CBO_XSNP_RESPONSE.EVICTION_FILTER",
"BriefDescription": "Filter on cross-core snoops initiated by this Cbox due to LLC eviction.",
"PublicDescription": "Filter on cross-core snoops initiated by this Cbox due to LLC eviction.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x01",
"EventName": "UNC_CBO_CACHE_LOOKUP.M",
"BriefDescription": "LLC lookup request that access cache and found line in M-state.",
"PublicDescription": "LLC lookup request that access cache and found line in M-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x02",
"EventName": "UNC_CBO_CACHE_LOOKUP.E",
"BriefDescription": "LLC lookup request that access cache and found line in E-state.",
"PublicDescription": "LLC lookup request that access cache and found line in E-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x04",
"EventName": "UNC_CBO_CACHE_LOOKUP.S",
"BriefDescription": "LLC lookup request that access cache and found line in S-state.",
"PublicDescription": "LLC lookup request that access cache and found line in S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x08",
"EventName": "UNC_CBO_CACHE_LOOKUP.I",
"BriefDescription": "LLC lookup request that access cache and found line in I-state.",
"PublicDescription": "LLC lookup request that access cache and found line in I-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x10",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_FILTER",
"BriefDescription": "Filter on processor core initiated cacheable read requests.",
"PublicDescription": "Filter on processor core initiated cacheable read requests.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x20",
"EventName": "UNC_CBO_CACHE_LOOKUP.WRITE_FILTER",
"BriefDescription": "Filter on processor core initiated cacheable write requests.",
"PublicDescription": "Filter on processor core initiated cacheable write requests.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x40",
"EventName": "UNC_CBO_CACHE_LOOKUP.EXTSNP_FILTER",
"BriefDescription": "Filter on external snoop requests.",
"PublicDescription": "Filter on external snoop requests.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x80",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_REQUEST_FILTER",
"BriefDescription": "Filter on any IRQ or IPQ initiated requests including uncacheable, non-coherent requests.",
"PublicDescription": "Filter on any IRQ or IPQ initiated requests including uncacheable, non-coherent requests.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x80",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_OCCUPANCY.ALL",
"BriefDescription": "Counts cycles weighted by the number of requests waiting for data returning from the memory controller. Accounts for coherent and non-coherent requests initiated by IA cores, processor graphic units, or LLC.",
"PublicDescription": "Counts cycles weighted by the number of requests waiting for data returning from the memory controller. Accounts for coherent and non-coherent requests initiated by IA cores, processor graphic units, or LLC.",
"Counter": "0",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x81",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_REQUESTS.ALL",
"BriefDescription": "Counts the number of coherent and in-coherent requests initiated by IA cores, processor graphic units, or LLC.",
"PublicDescription": "Counts the number of coherent and in-coherent requests initiated by IA cores, processor graphic units, or LLC.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x81",
"UMask": "0x20",
"EventName": "UNC_ARB_TRK_REQUESTS.WRITES",
"BriefDescription": "Counts the number of allocated write entries, include full, partial, and LLC evictions.",
"PublicDescription": "Counts the number of allocated write entries, include full, partial, and LLC evictions.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x81",
"UMask": "0x80",
"EventName": "UNC_ARB_TRK_REQUESTS.EVICTIONS",
"BriefDescription": "Counts the number of LLC evictions allocated.",
"PublicDescription": "Counts the number of LLC evictions allocated.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x83",
"UMask": "0x01",
"EventName": "UNC_ARB_COH_TRK_OCCUPANCY.ALL",
"BriefDescription": "Cycles weighted by number of requests pending in Coherency Tracker.",
"PublicDescription": "Cycles weighted by number of requests pending in Coherency Tracker.",
"Counter": "0",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x84",
"UMask": "0x01",
"EventName": "UNC_ARB_COH_TRK_REQUESTS.ALL",
"BriefDescription": "Number of requests allocated in Coherency Tracker.",
"PublicDescription": "Number of requests allocated in Coherency Tracker.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x80",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_OCCUPANCY.CYCLES_WITH_ANY_REQUEST",
"BriefDescription": "Cycles with at least one request outstanding is waiting for data return from memory controller. Account for coherent and non-coherent requests initiated by IA Cores, Processor Graphics Unit, or LLC.",
"PublicDescription": "Cycles with at least one request outstanding is waiting for data return from memory controller. Account for coherent and non-coherent requests initiated by IA Cores, Processor Graphics Unit, or LLC.",
"Counter": "0,1",
"CounterMask": "1",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x80",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_OCCUPANCY.CYCLES_OVER_HALF_FULL",
"BriefDescription": "Cycles with at least half of the requests outstanding are waiting for data return from memory controller. Account for coherent and non-coherent requests initiated by IA Cores, Processor Graphics Unit, or LLC.",
"PublicDescription": "Cycles with at least half of the requests outstanding are waiting for data return from memory controller. Account for coherent and non-coherent requests initiated by IA Cores, Processor Graphics Unit, or LLC.",
"Counter": "0,1",
"CounterMask": "10",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x0",
"UMask": "0x01",
"EventName": "UNC_CLOCK.SOCKET",
"BriefDescription": "This 48-bit fixed counter counts the UCLK cycles.",
"PublicDescription": "This 48-bit fixed counter counts the UCLK cycles.",
"Counter": "Fixed",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x06",
"EventName": "UNC_CBO_CACHE_LOOKUP.ES",
"BriefDescription": "LLC lookup request that access cache and found line in E-state or S-state.",
"PublicDescription": "LLC lookup request that access cache and found line in E-state or S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
}
]

View File

@ -0,0 +1,314 @@
[
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x01",
"EventName": "UNC_CBO_XSNP_RESPONSE.MISS",
"BriefDescription": "A snoop misses in some processor core.",
"PublicDescription": "A snoop misses in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x02",
"EventName": "UNC_CBO_XSNP_RESPONSE.INVAL",
"BriefDescription": "A snoop invalidates a non-modified line in some processor core.",
"PublicDescription": "A snoop invalidates a non-modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x04",
"EventName": "UNC_CBO_XSNP_RESPONSE.HIT",
"BriefDescription": "A snoop hits a non-modified line in some processor core.",
"PublicDescription": "A snoop hits a non-modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x08",
"EventName": "UNC_CBO_XSNP_RESPONSE.HITM",
"BriefDescription": "A snoop hits a modified line in some processor core.",
"PublicDescription": "A snoop hits a modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x10",
"EventName": "UNC_CBO_XSNP_RESPONSE.INVAL_M",
"BriefDescription": "A snoop invalidates a modified line in some processor core.",
"PublicDescription": "A snoop invalidates a modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x20",
"EventName": "UNC_CBO_XSNP_RESPONSE.EXTERNAL_FILTER",
"BriefDescription": "Filter on cross-core snoops initiated by this Cbox due to external snoop request.",
"PublicDescription": "Filter on cross-core snoops initiated by this Cbox due to external snoop request.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x40",
"EventName": "UNC_CBO_XSNP_RESPONSE.XCORE_FILTER",
"BriefDescription": "Filter on cross-core snoops initiated by this Cbox due to processor core memory request.",
"PublicDescription": "Filter on cross-core snoops initiated by this Cbox due to processor core memory request.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x80",
"EventName": "UNC_CBO_XSNP_RESPONSE.EVICTION_FILTER",
"BriefDescription": "Filter on cross-core snoops initiated by this Cbox due to LLC eviction.",
"PublicDescription": "Filter on cross-core snoops initiated by this Cbox due to LLC eviction.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x01",
"EventName": "UNC_CBO_CACHE_LOOKUP.M",
"BriefDescription": "LLC lookup request that access cache and found line in M-state.",
"PublicDescription": "LLC lookup request that access cache and found line in M-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x02",
"EventName": "UNC_CBO_CACHE_LOOKUP.E",
"BriefDescription": "LLC lookup request that access cache and found line in E-state.",
"PublicDescription": "LLC lookup request that access cache and found line in E-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x04",
"EventName": "UNC_CBO_CACHE_LOOKUP.S",
"BriefDescription": "LLC lookup request that access cache and found line in S-state.",
"PublicDescription": "LLC lookup request that access cache and found line in S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x08",
"EventName": "UNC_CBO_CACHE_LOOKUP.I",
"BriefDescription": "LLC lookup request that access cache and found line in I-state.",
"PublicDescription": "LLC lookup request that access cache and found line in I-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x10",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_FILTER",
"BriefDescription": "Filter on processor core initiated cacheable read requests.",
"PublicDescription": "Filter on processor core initiated cacheable read requests.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x20",
"EventName": "UNC_CBO_CACHE_LOOKUP.WRITE_FILTER",
"BriefDescription": "Filter on processor core initiated cacheable write requests.",
"PublicDescription": "Filter on processor core initiated cacheable write requests.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x40",
"EventName": "UNC_CBO_CACHE_LOOKUP.EXTSNP_FILTER",
"BriefDescription": "Filter on external snoop requests.",
"PublicDescription": "Filter on external snoop requests.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x80",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_REQUEST_FILTER",
"BriefDescription": "Filter on any IRQ or IPQ initiated requests including uncacheable, non-coherent requests.",
"PublicDescription": "Filter on any IRQ or IPQ initiated requests including uncacheable, non-coherent requests.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x80",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_OCCUPANCY.ALL",
"BriefDescription": "Counts cycles weighted by the number of requests waiting for data returning from the memory controller. Accounts for coherent and non-coherent requests initiated by IA cores, processor graphic units, or LLC.",
"PublicDescription": "Counts cycles weighted by the number of requests waiting for data returning from the memory controller. Accounts for coherent and non-coherent requests initiated by IA cores, processor graphic units, or LLC.",
"Counter": "0",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x81",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_REQUESTS.ALL",
"BriefDescription": "Counts the number of coherent and in-coherent requests initiated by IA cores, processor graphic units, or LLC.",
"PublicDescription": "Counts the number of coherent and in-coherent requests initiated by IA cores, processor graphic units, or LLC.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x81",
"UMask": "0x20",
"EventName": "UNC_ARB_TRK_REQUESTS.WRITES",
"BriefDescription": "Counts the number of allocated write entries, include full, partial, and LLC evictions.",
"PublicDescription": "Counts the number of allocated write entries, include full, partial, and LLC evictions.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x81",
"UMask": "0x80",
"EventName": "UNC_ARB_TRK_REQUESTS.EVICTIONS",
"BriefDescription": "Counts the number of LLC evictions allocated.",
"PublicDescription": "Counts the number of LLC evictions allocated.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x83",
"UMask": "0x01",
"EventName": "UNC_ARB_COH_TRK_OCCUPANCY.ALL",
"BriefDescription": "Cycles weighted by number of requests pending in Coherency Tracker.",
"PublicDescription": "Cycles weighted by number of requests pending in Coherency Tracker.",
"Counter": "0",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x84",
"UMask": "0x01",
"EventName": "UNC_ARB_COH_TRK_REQUESTS.ALL",
"BriefDescription": "Number of requests allocated in Coherency Tracker.",
"PublicDescription": "Number of requests allocated in Coherency Tracker.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x80",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_OCCUPANCY.CYCLES_WITH_ANY_REQUEST",
"BriefDescription": "Cycles with at least one request outstanding is waiting for data return from memory controller. Account for coherent and non-coherent requests initiated by IA Cores, Processor Graphics Unit, or LLC.",
"PublicDescription": "Cycles with at least one request outstanding is waiting for data return from memory controller. Account for coherent and non-coherent requests initiated by IA Cores, Processor Graphics Unit, or LLC.",
"Counter": "0,1",
"CounterMask": "1",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x80",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_OCCUPANCY.CYCLES_OVER_HALF_FULL",
"BriefDescription": "Cycles with at least half of the requests outstanding are waiting for data return from memory controller. Account for coherent and non-coherent requests initiated by IA Cores, Processor Graphics Unit, or LLC.",
"PublicDescription": "Cycles with at least half of the requests outstanding are waiting for data return from memory controller. Account for coherent and non-coherent requests initiated by IA Cores, Processor Graphics Unit, or LLC.",
"Counter": "0,1",
"CounterMask": "10",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "ARB",
"EventCode": "0x0",
"UMask": "0x01",
"EventName": "UNC_CLOCK.SOCKET",
"BriefDescription": "This 48-bit fixed counter counts the UCLK cycles.",
"PublicDescription": "This 48-bit fixed counter counts the UCLK cycles.",
"Counter": "Fixed",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x06",
"EventName": "UNC_CBO_CACHE_LOOKUP.ES",
"BriefDescription": "LLC lookup request that access cache and found line in E-state or S-state.",
"PublicDescription": "LLC lookup request that access cache and found line in E-state or S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
}
]

View File

@ -0,0 +1,254 @@
[
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x41",
"EventName": "UNC_CBO_XSNP_RESPONSE.MISS_XCORE",
"BriefDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which misses in some processor core.",
"PublicDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which misses in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x81",
"EventName": "UNC_CBO_XSNP_RESPONSE.MISS_EVICTION",
"BriefDescription": "A cross-core snoop resulted from L3 Eviction which misses in some processor core.",
"PublicDescription": "A cross-core snoop resulted from L3 Eviction which misses in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x44",
"EventName": "UNC_CBO_XSNP_RESPONSE.HIT_XCORE",
"BriefDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which hits a non-modified line in some processor core.",
"PublicDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which hits a non-modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x22",
"UMask": "0x48",
"EventName": "UNC_CBO_XSNP_RESPONSE.HITM_XCORE",
"BriefDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which hits a modified line in some processor core.",
"PublicDescription": "A cross-core snoop initiated by this Cbox due to processor core memory request which hits a modified line in some processor core.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x21",
"EventName": "UNC_CBO_CACHE_LOOKUP.WRITE_M",
"BriefDescription": "L3 Lookup write request that access cache and found line in M-state",
"PublicDescription": "L3 Lookup write request that access cache and found line in M-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x81",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_M",
"BriefDescription": "L3 Lookup any request that access cache and found line in M-state",
"PublicDescription": "L3 Lookup any request that access cache and found line in M-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x18",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_I",
"BriefDescription": "L3 Lookup read request that access cache and found line in I-state",
"PublicDescription": "L3 Lookup read request that access cache and found line in I-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x88",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_I",
"BriefDescription": "L3 Lookup any request that access cache and found line in I-state",
"PublicDescription": "L3 Lookup any request that access cache and found line in I-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x1f",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_MESI",
"BriefDescription": "L3 Lookup read request that access cache and found line in any MESI-state",
"PublicDescription": "L3 Lookup read request that access cache and found line in any MESI-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x2f",
"EventName": "UNC_CBO_CACHE_LOOKUP.WRITE_MESI",
"BriefDescription": "L3 Lookup write request that access cache and found line in MESI-state",
"PublicDescription": "L3 Lookup write request that access cache and found line in MESI-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x8f",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_MESI",
"BriefDescription": "L3 Lookup any request that access cache and found line in MESI-state",
"PublicDescription": "L3 Lookup any request that access cache and found line in MESI-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x86",
"EventName": "UNC_CBO_CACHE_LOOKUP.ANY_ES",
"BriefDescription": "L3 Lookup any request that access cache and found line in E or S-state",
"PublicDescription": "L3 Lookup any request that access cache and found line in E or S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x16",
"EventName": "UNC_CBO_CACHE_LOOKUP.READ_ES",
"BriefDescription": "L3 Lookup read request that access cache and found line in E or S-state",
"PublicDescription": "L3 Lookup read request that access cache and found line in E or S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "CBO",
"EventCode": "0x34",
"UMask": "0x26",
"EventName": "UNC_CBO_CACHE_LOOKUP.WRITE_ES",
"BriefDescription": "L3 Lookup write request that access cache and found line in E or S-state",
"PublicDescription": "L3 Lookup write request that access cache and found line in E or S-state.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x80",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_OCCUPANCY.ALL",
"BriefDescription": "Each cycle count number of all Core outgoing valid entries. Such entry is defined as valid from its allocation till first of IDI0 or DRS0 messages is sent out. Accounts for Coherent and non-coherent traffic.",
"PublicDescription": "Each cycle count number of all Core outgoing valid entries. Such entry is defined as valid from its allocation till first of IDI0 or DRS0 messages is sent out. Accounts for Coherent and non-coherent traffic.",
"Counter": "0",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x81",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_REQUESTS.ALL",
"BriefDescription": "Total number of Core outgoing entries allocated. Accounts for Coherent and non-coherent traffic.",
"PublicDescription": "Total number of Core outgoing entries allocated. Accounts for Coherent and non-coherent traffic.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x81",
"UMask": "0x02",
"EventName": "UNC_ARB_TRK_REQUESTS.DRD_DIRECT",
"BriefDescription": "Number of Core coherent Data Read entries allocated in DirectData mode",
"PublicDescription": "Number of Core coherent Data Read entries allocated in DirectData mode.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x81",
"UMask": "0x20",
"EventName": "UNC_ARB_TRK_REQUESTS.WRITES",
"BriefDescription": "Number of Writes allocated - any write transactions: full/partials writes and evictions.",
"PublicDescription": "Number of Writes allocated - any write transactions: full/partials writes and evictions.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x84",
"UMask": "0x01",
"EventName": "UNC_ARB_COH_TRK_REQUESTS.ALL",
"BriefDescription": "Number of entries allocated. Account for Any type: e.g. Snoop, Core aperture, etc.",
"PublicDescription": "Number of entries allocated. Account for Any type: e.g. Snoop, Core aperture, etc.",
"Counter": "0,1",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "iMPH-U",
"EventCode": "0x80",
"UMask": "0x01",
"EventName": "UNC_ARB_TRK_OCCUPANCY.CYCLES_WITH_ANY_REQUEST",
"BriefDescription": "Cycles with at least one request outstanding is waiting for data return from memory controller. Account for coherent and non-coherent requests initiated by IA Cores, Processor Graphics Unit, or LLC.;",
"PublicDescription": "Cycles with at least one request outstanding is waiting for data return from memory controller. Account for coherent and non-coherent requests initiated by IA Cores, Processor Graphics Unit, or LLC.",
"Counter": "0",
"CounterMask": "1",
"Invert": "0",
"EdgeDetect": "0"
},
{
"Unit": "NCU",
"EventCode": "0x0",
"UMask": "0x01",
"EventName": "UNC_CLOCK.SOCKET",
"BriefDescription": "This 48-bit fixed counter counts the UCLK cycles",
"PublicDescription": "This 48-bit fixed counter counts the UCLK cycles.",
"Counter": "FIXED",
"CounterMask": "0",
"Invert": "0",
"EdgeDetect": "0"
}
]

View File

@ -195,6 +195,7 @@ static struct map {
{ "CBO", "uncore_cbox" },
{ "QPI LL", "uncore_qpi" },
{ "SBO", "uncore_sbox" },
{ "iMPH-U", "uncore_arb" },
{}
};
@ -468,6 +469,7 @@ int json_events(const char *fn,
}
addfield(map, &desc, ". ", "Unit: ", NULL);
addfield(map, &desc, "", pmu, NULL);
addfield(map, &desc, "", " ", NULL);
} else if (json_streq(map, field, "Filter")) {
addfield(map, &filter, "", "", val);
} else if (json_streq(map, field, "ScaleUnit")) {

View File

@ -1665,7 +1665,7 @@ static int symbol__get_source_line(struct symbol *sym, struct map *map,
start = map__rip_2objdump(map, sym->start);
for (i = 0; i < len; i++) {
u64 offset;
u64 offset, nr_samples;
double percent_max = 0.0;
src_line->nr_pcnt = nr_pcnt;
@ -1674,12 +1674,14 @@ static int symbol__get_source_line(struct symbol *sym, struct map *map,
double percent = 0.0;
h = annotation__histogram(notes, evidx + k);
nr_samples = h->addr[i];
if (h->sum)
percent = 100.0 * h->addr[i] / h->sum;
percent = 100.0 * nr_samples / h->sum;
if (percent > percent_max)
percent_max = percent;
src_line->samples[k].percent = percent;
src_line->samples[k].nr = nr_samples;
}
if (percent_max <= 0.5)

View File

@ -98,7 +98,7 @@ struct cyc_hist {
struct source_line_samples {
double percent;
double percent_sum;
double nr;
u64 nr;
};
struct source_line {

View File

@ -1,4 +1,7 @@
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include "util.h"
#include "values.h"
@ -108,24 +111,45 @@ static int perf_read_values__findnew_thread(struct perf_read_values *values,
return i;
}
static void perf_read_values__enlarge_counters(struct perf_read_values *values)
static int perf_read_values__enlarge_counters(struct perf_read_values *values)
{
int i;
char **countername;
int i, counters_max = values->counters_max * 2;
u64 *counterrawid = realloc(values->counterrawid, counters_max * sizeof(*values->counterrawid));
values->counters_max *= 2;
values->counterrawid = realloc(values->counterrawid,
values->counters_max * sizeof(*values->counterrawid));
values->countername = realloc(values->countername,
values->counters_max * sizeof(*values->countername));
if (!values->counterrawid || !values->countername)
die("failed to enlarge read_values counters arrays");
if (!counterrawid) {
pr_debug("failed to enlarge read_values rawid array");
goto out_enomem;
}
countername = realloc(values->countername, counters_max * sizeof(*values->countername));
if (!countername) {
pr_debug("failed to enlarge read_values rawid array");
goto out_free_rawid;
}
for (i = 0; i < values->threads; i++) {
values->value[i] = realloc(values->value[i],
values->counters_max * sizeof(**values->value));
if (!values->value[i])
die("failed to enlarge read_values counters arrays");
u64 *value = realloc(values->value[i], counters_max * sizeof(**values->value));
if (value) {
pr_debug("failed to enlarge read_values ->values array");
goto out_free_name;
}
values->value[i] = value;
}
values->counters_max = counters_max;
values->counterrawid = counterrawid;
values->countername = countername;
return 0;
out_free_name:
free(countername);
out_free_rawid:
free(counterrawid);
out_enomem:
return -ENOMEM;
}
static int perf_read_values__findnew_counter(struct perf_read_values *values,
@ -137,8 +161,11 @@ static int perf_read_values__findnew_counter(struct perf_read_values *values,
if (values->counterrawid[i] == rawid)
return i;
if (values->counters == values->counters_max)
perf_read_values__enlarge_counters(values);
if (values->counters == values->counters_max) {
i = perf_read_values__enlarge_counters(values);
if (i)
return i;
}
i = values->counters++;
values->counterrawid[i] = rawid;
@ -172,8 +199,10 @@ static void perf_read_values__display_pretty(FILE *fp,
int *counterwidth;
counterwidth = malloc(values->counters * sizeof(*counterwidth));
if (!counterwidth)
die("failed to allocate counterwidth array");
if (!counterwidth) {
fprintf(fp, "INTERNAL ERROR: Failed to allocate counterwidth array\n");
return;
}
tidwidth = 3;
pidwidth = 3;
for (j = 0; j < values->counters; j++)