File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -10283,6 +10283,7 @@ uint32 PCM::getMaxNumOfCBoxesInternal() const
10283
10283
break ;
10284
10284
case SNOWRIDGE:
10285
10285
num = (uint32)num_phys_cores_per_socket / 4 ;
10286
+ maxNumOfCBoxesBasedOnCoreCount = true ;
10286
10287
break ;
10287
10288
default :
10288
10289
/*
@@ -10291,6 +10292,7 @@ uint32 PCM::getMaxNumOfCBoxesInternal() const
10291
10292
* value to be returned.
10292
10293
*/
10293
10294
num = (uint32)num_phys_cores_per_socket;
10295
+ maxNumOfCBoxesBasedOnCoreCount = true ;
10294
10296
}
10295
10297
#ifdef PCM_USE_PERF
10296
10298
if (num <= 0 )
Original file line number Diff line number Diff line change @@ -624,6 +624,7 @@ class PCM_API PCM
624
624
int32 num_phys_cores_per_socket;
625
625
int32 num_online_cores;
626
626
int32 num_online_sockets;
627
+ mutable bool maxNumOfCBoxesBasedOnCoreCount{false };
627
628
uint32 accel;
628
629
uint32 accel_counters_num_max;
629
630
uint32 core_gen_counter_num_max;
@@ -1886,6 +1887,12 @@ class PCM_API PCM
1886
1887
*/
1887
1888
bool isSomeCoreOfflined ();
1888
1889
1890
+ // ! \brief Returns true if the CBox or CHA PMU count detection relies on physical core count
1891
+ bool isMaxNumOfCBoxesBasedOnCoreCount () const
1892
+ {
1893
+ return maxNumOfCBoxesBasedOnCoreCount;
1894
+ }
1895
+
1889
1896
/* ! \brief Returns the maximum number of custom (general-purpose) core events supported by CPU
1890
1897
*/
1891
1898
int32 getMaxCustomCoreEvents ();
Original file line number Diff line number Diff line change @@ -70,9 +70,19 @@ void IPlatform::init()
70
70
{
71
71
print_cpu_details ();
72
72
73
- if (m_pcm->isSomeCoreOfflined ())
73
+ if (m_pcm->isMaxNumOfCBoxesBasedOnCoreCount () && m_pcm-> isSomeCoreOfflined ())
74
74
{
75
- cerr << " Core offlining is not supported. Program aborted\n " ;
75
+ /*
76
+ The bandwwidth metrics can be calculated correctly only if we aggregate
77
+ the event counts from all CHAs (CBoxes) in the socket. For this need to
78
+ know the number of CBoxes in the socket. For some processors we do not
79
+ have access to a register containing the CHA count but on those processors
80
+ the number of CBoxes is equal to the number of cores. On such systems if
81
+ the cores are offlined then the number of CBoxes can't be determined.
82
+ pcm-pcie does not support such systems because the bandwidth can't be
83
+ computed correctly.
84
+ */
85
+ cerr << " Core offlining is not supported on your processor. Program aborted\n " ;
76
86
exit (EXIT_FAILURE);
77
87
}
78
88
}
You can’t perform that action at this time.
0 commit comments