Skip to content

Commit

Permalink
simple-pebs: support Skylake
Browse files Browse the repository at this point in the history
  • Loading branch information
soramichi committed Feb 21, 2017
1 parent d748b4c commit 8dcea05
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions simple-pebs/simple-pebs.c
Expand Up @@ -111,6 +111,12 @@ struct pebs_v2 {
u64 tsx;
};

struct pebs_v3 {
struct pebs_v2 v2;
u64 tsc;
};


static int pebs_record_size = sizeof(struct pebs_v1);

#define FEAT1_PDCM BIT(15)
Expand Down Expand Up @@ -142,6 +148,7 @@ static bool check_cpu(void)
case 58: /* IvyBridge */
case 63: /* Haswell_EP */
case 69: /* Haswell_ULT */
case 94: /* Skylake */
pebs_event = 0x1c2; /* UOPS_RETIRED.ALL */
break;

Expand Down Expand Up @@ -190,6 +197,9 @@ static bool check_cpu(void)
case 2:
pebs_record_size = sizeof(struct pebs_v2);
break;
case 3:
pebs_record_size = sizeof(struct pebs_v3);
break;
default:
pr_err("Unsupported PEBS format\n");
return false;
Expand Down

0 comments on commit 8dcea05

Please sign in to comment.