Skip to content

Commit f4c6217

Browse files
kjain101Peter Zijlstra
authored andcommitted
perf: Add comment about current state of PERF_MEM_LVL_* namespace and remove an extra line
Add a comment about PERF_MEM_LVL_* namespace being depricated to some extent in favour of added PERF_MEM_{LVLNUM_,REMOTE_,SNOOPX_} fields. Remove an extra line present in perf_mem__lvl_scnprintf function. Signed-off-by: Kajol Jain <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 79df457 commit f4c6217

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

include/uapi/linux/perf_event.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,13 @@ union perf_mem_data_src {
12561256
#define PERF_MEM_OP_EXEC 0x10 /* code (execution) */
12571257
#define PERF_MEM_OP_SHIFT 0
12581258

1259-
/* memory hierarchy (memory level, hit or miss) */
1259+
/*
1260+
* PERF_MEM_LVL_* namespace being depricated to some extent in the
1261+
* favour of newer composite PERF_MEM_{LVLNUM_,REMOTE_,SNOOPX_} fields.
1262+
* Supporting this namespace inorder to not break defined ABIs.
1263+
*
1264+
* memory hierarchy (memory level, hit or miss)
1265+
*/
12601266
#define PERF_MEM_LVL_NA 0x01 /* not available */
12611267
#define PERF_MEM_LVL_HIT 0x02 /* hit level */
12621268
#define PERF_MEM_LVL_MISS 0x04 /* miss level */

tools/include/uapi/linux/perf_event.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,13 @@ union perf_mem_data_src {
12411241
#define PERF_MEM_OP_EXEC 0x10 /* code (execution) */
12421242
#define PERF_MEM_OP_SHIFT 0
12431243

1244-
/* memory hierarchy (memory level, hit or miss) */
1244+
/*
1245+
* PERF_MEM_LVL_* namespace being depricated to some extent in the
1246+
* favour of newer composite PERF_MEM_{LVLNUM_,REMOTE_,SNOOPX_} fields.
1247+
* Supporting this namespace inorder to not break defined ABIs.
1248+
*
1249+
* memory hierarchy (memory level, hit or miss)
1250+
*/
12451251
#define PERF_MEM_LVL_NA 0x01 /* not available */
12461252
#define PERF_MEM_LVL_HIT 0x02 /* hit level */
12471253
#define PERF_MEM_LVL_MISS 0x04 /* miss level */

tools/perf/util/mem-events.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info)
320320
/* already taken care of */
321321
m &= ~(PERF_MEM_LVL_HIT|PERF_MEM_LVL_MISS);
322322

323-
324323
if (mem_info && mem_info->data_src.mem_remote) {
325324
strcat(out, "Remote ");
326325
l += 7;

0 commit comments

Comments
 (0)