@@ -313,7 +313,7 @@ class IDX_PMU
313313 std::vector<HWRegisterPtr> counterFilterENG;
314314 std::vector<HWRegisterPtr> counterFilterTC;
315315 std::vector<HWRegisterPtr> counterFilterPGSZ;
316- std::vector<HWRegisterPtr> counterFilterXFERSZ;
316+ std::vector<HWRegisterPtr> counterFilterXFERSZ;
317317
318318 IDX_PMU (const bool perfMode_,
319319 const uint32 numaNode_,
@@ -570,7 +570,6 @@ class SimpleCounterState
570570 friend uint64 getNumberOfEvents (const T & before, const T & after);
571571 friend class PCM ;
572572 uint64 data;
573-
574573public:
575574 SimpleCounterState () : data(0 )
576575 { }
@@ -957,6 +956,7 @@ class PCM_API PCM
957956 THRESH,
958957 CH_MASK,
959958 FC_MASK,
959+ UNIT_TYPE,
960960 /* Below are not part of perfmon definition */
961961 H_EVENT_NAME,
962962 V_EVENT_NAME,
@@ -1281,9 +1281,14 @@ class PCM_API PCM
12811281 void programCXLCM (const uint64* events);
12821282 void cleanupUncorePMUs (const bool silent = false );
12831283
1284+ static bool isCLX (int cpu_family_model_, int cpu_stepping_)
1285+ {
1286+ return (PCM::SKX == cpu_family_model_) && (cpu_stepping_ > 4 && cpu_stepping_ < 8 );
1287+ }
1288+
12841289 bool isCLX () const // Cascade Lake-SP
12851290 {
1286- return (PCM::SKX == cpu_family_model) && ( cpu_stepping > 4 && cpu_stepping < 8 );
1291+ return isCLX ( cpu_family_model, cpu_stepping);
12871292 }
12881293
12891294 static bool isCPX (int cpu_family_model_, int cpu_stepping_) // Cooper Lake
@@ -1397,6 +1402,9 @@ class PCM_API PCM
13971402 // ! \brief Returns the number of IIO stacks per socket
13981403 uint32 getMaxNumOfIIOStacks () const ;
13991404
1405+ // ! \brief Returns the number of IO stacks per socket
1406+ uint32 getMaxNumOfIOStacks () const ;
1407+
14001408 /* ! \brief Returns the number of IDX accel devs
14011409 \param accel index of IDX accel
14021410 */
@@ -1682,6 +1690,7 @@ class PCM_API PCM
16821690 case MTL:
16831691 case LNL:
16841692 case ARL:
1693+ case PTL:
16851694 if (topology[coreID].core_type == TopologyEntry::Atom)
16861695 {
16871696 return eCoreOCREvent;
@@ -1701,6 +1710,7 @@ class PCM_API PCM
17011710 case MTL:
17021711 case LNL:
17031712 case ARL:
1713+ case PTL:
17041714 useGLCOCREvent = true ;
17051715 break ;
17061716
@@ -1753,7 +1763,7 @@ class PCM_API PCM
17531763
17541764 One needs to call this method when your program finishes or/and you are not going to use the
17551765 performance counting routines anymore.
1756- */
1766+ */
17571767 void cleanup (const bool silent = false );
17581768
17591769 /* ! \brief Forces PMU reset
@@ -1831,7 +1841,7 @@ class PCM_API PCM
18311841 \return Number of sockets in the system
18321842 */
18331843 uint32 getNumSockets () const ;
1834-
1844+
18351845 /* ! \brief Reads the accel type in the system
18361846 \return acceltype
18371847 */
@@ -1849,7 +1859,7 @@ class PCM_API PCM
18491859
18501860 /* ! \brief Sets the Number of AccelCounters in the system
18511861 \return number of counters
1852- */
1862+ */
18531863 void setNumberofAccelCounters (uint32 input);
18541864
18551865 /* ! \brief Reads number of online sockets (CPUs) in the system
@@ -1960,6 +1970,7 @@ class PCM_API PCM
19601970 LNL = PCM_CPU_FAMILY_MODEL (6 , 0xBD ),
19611971 ARL = PCM_CPU_FAMILY_MODEL (6 , 197 ),
19621972 ARL_1 = PCM_CPU_FAMILY_MODEL (6 , 198 ),
1973+ PTL = PCM_CPU_FAMILY_MODEL (6 , 204 ),
19631974 BDX = PCM_CPU_FAMILY_MODEL (6 , 79 ),
19641975 KNL = PCM_CPU_FAMILY_MODEL (6 , 87 ),
19651976 SKL = PCM_CPU_FAMILY_MODEL (6 , 94 ),
@@ -2201,6 +2212,7 @@ class PCM_API PCM
22012212 return 6 ;
22022213 case LNL:
22032214 case ARL:
2215+ case PTL:
22042216 return 12 ;
22052217 case SNOWRIDGE:
22062218 case ELKHART_LAKE:
@@ -2422,19 +2434,18 @@ class PCM_API PCM
24222434
24232435 // ! \brief Control QAT telemetry service
24242436 // ! \param dev device index
2425- // ! \param operation control code
2437+ // ! \param operation control code
24262438 void controlQATTelemetry (uint32 dev, uint32 operation);
24272439
24282440 // ! \brief Program IDX events
24292441 // ! \param events config of event to program
2430- // ! \param filters_wq filters(work queue) of event to program
2431- // ! \param filters_eng filters(engine) of event to program
2432- // ! \param filters_tc filters(traffic class) of event to program
2433- // ! \param filters_pgsz filters(page size) of event to program
2434- // ! \param filters_xfersz filters(transfer size) of event to program
2442+ // ! \param filters_wq filters(work queue) of event to program
2443+ // ! \param filters_eng filters(engine) of event to program
2444+ // ! \param filters_tc filters(traffic class) of event to program
2445+ // ! \param filters_pgsz filters(page size) of event to program
2446+ // ! \param filters_xfersz filters(transfer size) of event to program
24352447 void programIDXAccelCounters (uint32 accel, std::vector<uint64_t > &events, std::vector<uint32> &filters_wq, std::vector<uint32> &filters_eng, std::vector<uint32> &filters_tc, std::vector<uint32> &filters_pgsz, std::vector<uint32> &filters_xfersz);
24362448
2437-
24382449 // ! \brief Get the state of IIO counter
24392450 // ! \param socket socket of the IIO stack
24402451 // ! \param IIOStack id of the IIO stack
@@ -2465,6 +2476,11 @@ class PCM_API PCM
24652476 // ! \param cpu_family_model_ cpu model (if no parameter provided the codename of the detected CPU is returned)
24662477 const char * getUArchCodename (const int32 cpu_family_model_ = -1 ) const ;
24672478
2479+ // ! \brief Convert CPU Family/Model/Stepping to microarchitecture codename
2480+ // ! \param cpu_family_model_ cpu family model
2481+ // ! \param cpu_stepping necessary for some CPU models to distinguish between different microarchitectures
2482+ static const char * cpuFamilyModelToUArchCodename (const int32 cpu_family_model_, const int32 cpu_stepping_ = -1 );
2483+
24682484 // ! \brief Get Brand string of processor
24692485 static std::string getCPUBrandString ();
24702486 std::string getCPUFamilyModelString ();
@@ -2553,6 +2569,7 @@ class PCM_API PCM
25532569 || cpu_family_model == PCM::MTL
25542570 || cpu_family_model == PCM::LNL
25552571 || cpu_family_model == PCM::ARL
2572+ || cpu_family_model == PCM::PTL
25562573 || cpu_family_model == PCM::SPR
25572574 || cpu_family_model == PCM::EMR
25582575 || cpu_family_model == PCM::GNR
@@ -2593,6 +2610,7 @@ class PCM_API PCM
25932610 || cpu_family_model == PCM::MTL
25942611 || cpu_family_model == PCM::LNL
25952612 || cpu_family_model == PCM::ARL
2613+ || cpu_family_model == PCM::PTL
25962614 || cpu_family_model == PCM::SPR
25972615 || cpu_family_model == PCM::EMR
25982616 || cpu_family_model == PCM::GNR
@@ -2668,7 +2686,7 @@ class PCM_API PCM
26682686 || cpu_family_model == PCM::GNR_D
26692687 );
26702688 }
2671-
2689+
26722690 bool memoryTrafficMetricsAvailable () const
26732691 {
26742692 return (!(isAtom () || cpu_family_model == PCM::CLARKDALE))
@@ -2893,6 +2911,7 @@ class PCM_API PCM
28932911 || cpu_family_model == MTL
28942912 || cpu_family_model == LNL
28952913 || cpu_family_model == ARL
2914+ || cpu_family_model == PTL
28962915 || useSKLPath ()
28972916 ;
28982917 }
@@ -4458,6 +4477,7 @@ uint64 getL2CacheMisses(const CounterStateType & before, const CounterStateType
44584477 || cpu_family_model == PCM::MTL
44594478 || cpu_family_model == PCM::LNL
44604479 || cpu_family_model == PCM::ARL
4480+ || cpu_family_model == PCM::PTL
44614481 ) {
44624482 return after.Event [BasicCounterState::SKLL2MissPos] - before.Event [BasicCounterState::SKLL2MissPos];
44634483 }
@@ -4574,6 +4594,7 @@ uint64 getL3CacheHitsSnoop(const CounterStateType & before, const CounterStateTy
45744594 || cpu_family_model == PCM::MTL
45754595 || cpu_family_model == PCM::LNL
45764596 || cpu_family_model == PCM::ARL
4597+ || cpu_family_model == PCM::PTL
45774598 )
45784599 {
45794600 const int64 misses = getL3CacheMisses (before, after);
0 commit comments