Skip to content

Commit

Permalink
type field of perf_event_attr.config must not be used when raw_type f…
Browse files Browse the repository at this point in the history
…ield is set
  • Loading branch information
soramichi authored and opcm committed Nov 6, 2018
1 parent a03613a commit 769c8dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpucounters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2212,7 +2212,7 @@ PCM::ErrorCode PCM::program(const PCM::ProgramMode mode_, const void * parameter
if(canUsePerf)
{
e.type = PERF_TYPE_RAW;
e.config = (1ULL<<63ULL) + (((long long unsigned)PERF_TYPE_RAW)<<(64ULL-8ULL)) + event_select_reg.value;
e.config = (1ULL<<63ULL) + event_select_reg.value;
if (event_select_reg.fields.event_select == OFFCORE_RESPONSE_0_EVTNR)
e.config1 = pExtDesc->OffcoreResponseMsrValue[0];
if (event_select_reg.fields.event_select == OFFCORE_RESPONSE_1_EVTNR)
Expand Down

0 comments on commit 769c8dd

Please sign in to comment.