Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push 2024 05 22 #748

Merged
merged 30 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7b5b04f
Add initial SRF support
rdementi May 10, 2024
7ccc3a2
support more cpus for localMemoryRequestRatioMetric
rdementi May 17, 2024
2b8d6dd
refactoring and copyright year update
rdementi May 17, 2024
413eed7
refactoring
rdementi May 17, 2024
edcf497
refactoring
rdementi May 17, 2024
7e07186
refactoring
rdementi May 17, 2024
2b61625
refactoring
rdementi May 17, 2024
944b74b
refactoring
rdementi May 17, 2024
dfb8239
refactor
rdementi May 17, 2024
592bc52
refactor
rdementi May 17, 2024
05e862c
refactor
rdementi May 17, 2024
a07c39d
Add opCode event file for SRF
May 17, 2024
11cc543
Add skeleton for BirchStreamPlatform class
May 17, 2024
8e65aa4
Add checking first valid BUS ID to get_cpu_bus() function
May 17, 2024
afd3db7
Run internal loop get_cpu_bus() 4 times instead of 8
May 17, 2024
3d3afd8
Cosmetic changes in get_cpu_bus() function
May 17, 2024
752a17b
Add function to struct pci to check whether it's Intel device
May 17, 2024
3416589
Cosmetic changes in get_cpu_bus()
May 17, 2024
c462ca4
Enable pcm-iio for SRF
May 17, 2024
b3900de
Cosmetic changes in pcm-iio.cpp
May 17, 2024
426c0f7
Fix incorrect PMON IDs for HCx stacks
May 19, 2024
a61bd86
implement Intel PMT TelemetryArray on Linux
rdementi May 19, 2024
b4d0abc
pcm-raw: add pmt raw events
rdementi May 19, 2024
714e6b4
pcm-raw: improve format print for registers
rdementi May 19, 2024
49c4053
make the code more robust
rdementi May 20, 2024
60588cf
pcm-raw: document raw pmt access
rdementi May 21, 2024
a24fd4a
minor doc fixes
rdementi May 21, 2024
6d442e9
minor doc fixes
rdementi May 21, 2024
f4eb81a
use std::snprintf
rdementi May 22, 2024
2dfbd5f
Merge remote-tracking branch 'opcm-github/master'
rdementi May 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/cpucounters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4432,11 +4432,7 @@ std::string PCM::getCPUFamilyModelString(const uint32 cpu_family_, const uint32
{
char buffer[sizeof(int)*4*3+6];
std::fill(buffer, buffer + sizeof(buffer), 0);
#ifdef _MSC_VER
sprintf_s(buffer,sizeof(buffer),"GenuineIntel-%d-%2X-%X", cpu_family_, cpu_model_, cpu_stepping_);
#else
snprintf(buffer,sizeof(buffer),"GenuineIntel-%d-%2X-%X", cpu_family_, cpu_model_, cpu_stepping_);
#endif
std::snprintf(buffer,sizeof(buffer),"GenuineIntel-%d-%2X-%X", cpu_family_, cpu_model_, cpu_stepping_);
std::string result(buffer);
return result;
}
Expand Down
1 change: 0 additions & 1 deletion src/pcm-accel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "pcm-accel-common.h"
#ifdef _MSC_VER
#pragma warning(disable : 4996) // for sprintf
#include <windows.h>
#include "windows/windriver.h"
#else
Expand Down
1 change: 0 additions & 1 deletion src/pcm-iio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "cpucounters.h"

#ifdef _MSC_VER
#pragma warning(disable : 4996) // for sprintf
#include <windows.h>
#include "windows/windriver.h"
#else
Expand Down
1 change: 0 additions & 1 deletion src/pcm-latency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// written by Subhiksha Ravisundar
#include "cpucounters.h"
#ifdef _MSC_VER
#pragma warning(disable : 4996) // for sprintf
#include <windows.h>
#include "windows/windriver.h"
#else
Expand Down
1 change: 0 additions & 1 deletion src/pcm-lspci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// written by Patrick Lu
#include "cpucounters.h"
#ifdef _MSC_VER
#pragma warning(disable : 4996) // for sprintf
#include <windows.h>
#include "windows/windriver.h"
#else
Expand Down
4 changes: 2 additions & 2 deletions src/pcm-msr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ int mainThrows(int argc, char * argv[])
uint64 value2 = value;
extractBitsPrintHelper(bits, value, dec);
char cname[100];
if (core_in_dec) sprintf(cname,"%d",core);
else sprintf(cname,"0x%x",core);
if (core_in_dec) std::snprintf(cname, sizeof(cname), "%d", core);
else std::snprintf(cname, sizeof(cname), "0x%x", core);
std::cout << " from MSR " << msr << " on core " << cname << "\n";
auto itx = it;
itx++;
Expand Down
3 changes: 3 additions & 0 deletions src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
#include <map>
#include <unordered_map>

#ifdef __linux__
#include <unistd.h>
#endif
namespace pcm {
std::string safe_getenv(const char* env);
}
Expand Down
Loading