-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag '2024-05-21' into push-2024-05-21
Change-Id: I5c1aead093735cd73826c00e72d8aaf35ca918e4
- Loading branch information
Showing
32 changed files
with
3,385 additions
and
904 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
|
||
echo "Intel(r) Performance Counter Monitor" | ||
echo "Birch Stream Die Statistics Utility" | ||
echo | ||
|
||
# Run the pcm-tpmi command and store the output | ||
output=$(pcm-tpmi 2 0x10 -d) | ||
|
||
# Use a while loop to read each line of the output | ||
echo "$output" | while read -r line; do | ||
# Check if the line contains "Read value" | ||
if [[ $line =~ Read\ value\ ([0-9]+)\ from\ TPMI\ ID\ 2@16\ for\ entry\ ([0-9]+)\ in\ instance\ ([0-9]+) ]]; then | ||
# Extract the value using BASH_REMATCH | ||
value=${BASH_REMATCH[1]} | ||
die=${BASH_REMATCH[2]} | ||
socket=${BASH_REMATCH[3]} | ||
|
||
freq=$(( (value & 0x7F) * 100 )) | ||
compute=$(( (value >> 23) & 1 )) | ||
llc=$(( (value >> 24) & 1 )) | ||
memory=$(( (value >> 25) & 1 )) | ||
io=$(( (value >> 26) & 1 )) | ||
|
||
die_type="" | ||
if [ "$compute" -ne 0 ]; then | ||
die_type="compute/" | ||
fi | ||
if [ "$llc" -ne 0 ]; then | ||
die_type="${die_type}LLC/" | ||
fi | ||
if [ "$memory" -ne 0 ]; then | ||
die_type="${die_type}memory/" | ||
fi | ||
if [ "$io" -ne 0 ]; then | ||
die_type="${die_type}IO" | ||
fi | ||
die_type="${die_type%"${die_type##*[!\/]}"}" | ||
str="Socket $socket die $die ($die_type) uncore frequency" | ||
printf "%-60s: %d MHz\n" "$str" "$freq" | ||
fi | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
{ | ||
"core" : { | ||
"programmable" : { | ||
"EventCode": {"Config": 0, "Position": 0, "Width": 8}, | ||
"UMask": {"Config": 0, "Position": 8, "Width": 8}, | ||
"User": {"Config": 0, "Position": 16, "Width": 1, "DefaultValue": 1}, | ||
"OS": {"Config": 0, "Position": 17, "Width": 1, "DefaultValue": 1}, | ||
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1}, | ||
"PinControl": {"Config": 0, "Position": 19, "Width": 1, "DefaultValue": 0}, | ||
"APICInt": {"Config": 0, "Position": 20, "Width": 1, "DefaultValue": 0}, | ||
"Enable": {"Config": 0, "Position": 22, "Width": 1, "DefaultValue": 1}, | ||
"Invert": {"Config": 0, "Position": 23, "Width": 1}, | ||
"CounterMask": {"Config": 0, "Position": 24, "Width": 8}, | ||
"MSRIndex": { | ||
"0x1a6" : {"Config": 1, "Position": 0, "Width": 64}, | ||
"0x1a7" : {"Config": 2, "Position": 0, "Width": 64}, | ||
"0x3f6" : {"Config": 3, "Position": 0, "Width": 64}, | ||
"0x3f7" : {"Config": 4, "Position": 0, "Width": 64} | ||
} | ||
}, | ||
"fixed0" : { | ||
"OS": {"Config": 0, "Position": 0, "Width": 1, "DefaultValue": 1}, | ||
"User": {"Config": 0, "Position": 1, "Width": 1, "DefaultValue": 1}, | ||
"EnablePMI": {"Config": 0, "Position": 3, "Width": 1, "DefaultValue": 0}, | ||
"EventCode": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"}, | ||
"UMask": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"}, | ||
"EdgeDetect": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"}, | ||
"Invert": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"}, | ||
"CounterMask": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"} | ||
}, | ||
"fixed1" : { | ||
"OS": {"Config": 0, "Position": 4, "Width": 1, "DefaultValue": 1}, | ||
"User": {"Config": 0, "Position": 5, "Width": 1, "DefaultValue": 1}, | ||
"EnablePMI": {"Config": 0, "Position": 7, "Width": 1, "DefaultValue": 0}, | ||
"EventCode": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"}, | ||
"UMask": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"}, | ||
"EdgeDetect": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"}, | ||
"Invert": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"}, | ||
"CounterMask": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"} | ||
}, | ||
"fixed2" : { | ||
"OS": {"Config": 0, "Position": 8, "Width": 1, "DefaultValue": 1}, | ||
"User": {"Config": 0, "Position": 9, "Width": 1, "DefaultValue": 1}, | ||
"EnablePMI": {"Config": 0, "Position": 11, "Width": 1, "DefaultValue": 0}, | ||
"EventCode": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"}, | ||
"UMask": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"}, | ||
"EdgeDetect": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"}, | ||
"Invert": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"}, | ||
"CounterMask": {"Config": 0, "Position": -1, "__comment": "position=-1 means field ignored"} | ||
} | ||
}, | ||
"cha" : { | ||
"programmable" : { | ||
"EventCode": {"Config": 0, "Position": 0, "Width": 8}, | ||
"UMask": {"Config": 0, "Position": 8, "Width": 8}, | ||
"TIDEnable": {"Config": 0, "Position": 16, "Width": 1, "DefaultValue": 0}, | ||
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0}, | ||
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0}, | ||
"UMaskExt": {"Config": 0, "Position": 32, "Width": 26}, | ||
"TID": {"Config": 1, "Position": 0, "Width": 10, "DefaultValue": 0} | ||
} | ||
}, | ||
"imc" : { | ||
"programmable" : { | ||
"EventCode": {"Config": 0, "Position": 0, "Width": 8}, | ||
"UMask": {"Config": 0, "Position": 8, "Width": 8}, | ||
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0}, | ||
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0} | ||
} | ||
}, | ||
"xpi" : { | ||
"__comment" : "this is for UPI LL and QPI LL uncore PMUs", | ||
"programmable" : { | ||
"EventCode": {"Config": 0, "Position": 0, "Width": 8}, | ||
"UMask": {"Config": 0, "Position": 8, "Width": 8}, | ||
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0}, | ||
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0}, | ||
"UMaskExt": {"Config": 0, "Position": 32, "Width": 24} | ||
} | ||
}, | ||
"m2m" : { | ||
"programmable" : { | ||
"EventCode": {"Config": 0, "Position": 0, "Width": 8}, | ||
"UMask": {"Config": 0, "Position": 8, "Width": 8}, | ||
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0}, | ||
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0}, | ||
"UMaskExt": {"Config": 0, "Position": 32, "Width": 8} | ||
} | ||
}, | ||
"m3upi" : { | ||
"programmable" : { | ||
"EventCode": {"Config": 0, "Position": 0, "Width": 8}, | ||
"UMask": {"Config": 0, "Position": 8, "Width": 8}, | ||
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0}, | ||
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0} | ||
} | ||
}, | ||
"mdf" : { | ||
"programmable" : { | ||
"EventCode": {"Config": 0, "Position": 0, "Width": 8}, | ||
"UMask": {"Config": 0, "Position": 8, "Width": 8}, | ||
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0}, | ||
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0} | ||
} | ||
}, | ||
"irp" : { | ||
"programmable" : { | ||
"EventCode": {"Config": 0, "Position": 0, "Width": 8}, | ||
"UMask": {"Config": 0, "Position": 8, "Width": 8}, | ||
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0}, | ||
"Threshold": {"Config": 0, "Position": 24, "Width": 8, "DefaultValue": 0} | ||
} | ||
}, | ||
"pcu" : { | ||
"programmable" : { | ||
"EventCode": {"Config": 0, "Position": 0, "Width": 8}, | ||
"UMask": {"Config": 0, "Position": 8, "Width": 8}, | ||
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0} | ||
} | ||
}, | ||
"pciex8" : { | ||
"programmable" : { | ||
"EventCode": {"Config": 0, "Position": 0, "Width": 8}, | ||
"UMask": {"Config": 0, "Position": 8, "Width": 8}, | ||
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0} | ||
} | ||
}, | ||
"pciex16" : { | ||
"programmable" : { | ||
"EventCode": {"Config": 0, "Position": 0, "Width": 8}, | ||
"UMask": {"Config": 0, "Position": 8, "Width": 8}, | ||
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0} | ||
} | ||
}, | ||
"iio" : { | ||
"programmable" : { | ||
"EventCode": {"Config": 0, "Position": 0, "Width": 8}, | ||
"UMask": {"Config": 0, "Position": 8, "Width": 8}, | ||
"EdgeDetect": {"Config": 0, "Position": 18, "Width": 1, "DefaultValue": 0}, | ||
"Threshold": {"Config": 0, "Position": 24, "Width": 12, "DefaultValue": 0}, | ||
"PortMask": {"Config": 0, "Position": 36, "Width": 12}, | ||
"FCMask": {"Config": 0, "Position": 48, "Width": 3} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.