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

WIP: PMU data collection #4

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open

WIP: PMU data collection #4

wants to merge 9 commits into from

Conversation

haojiang66
Copy link
Collaborator

new

@zhengly123 zhengly123 changed the base branch from master to dev July 29, 2023 02:41
include/dbg.h Outdated Show resolved Hide resolved
src/CollectorPapi.cc Outdated Show resolved Hide resolved
src/CollectorPapi.cc Outdated Show resolved Hide resolved
@zhengly123 zhengly123 mentioned this pull request Jul 30, 2023
Closed
Comment on lines 4 to 12
#define checkPapi(call,stdpapi) \
{ \
auto err = call; \
if (stdpapi != err) { \
fprintf(stderr, "PAPI error in %s:%i : %s.\n", __FILE__, __LINE__, \
PAPI_strerror(retval)); \
exit(EXIT_FAILURE); \
} \
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This macro is already defined in include/collector_papi.h. This overload with two paramters seems to be seldom used as most of the return values are PAPI_OK. I suggest using the original papiCheck without a custom return value.

test/test_collector.cc Outdated Show resolved Hide resolved
// and papi_start_counters() in deprecated/pmc.cpp.
int retval = 0;
EventSet = PAPI_NULL;
PAPI_library_init(PAPI_VER_CURRENT);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check the return value?

Comment on lines 41 to 43
int *test_data = new int[N];

int test_index[N];
int *test_index = new int[N];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use vector or shared_ptr

@zhengly123 zhengly123 changed the title Jyh5 PMU data collection Aug 3, 2023
@haojiang66 haojiang66 closed this Aug 8, 2023
@haojiang66 haojiang66 reopened this Aug 8, 2023
@haojiang66
Copy link
Collaborator Author

stg

@zhengly123 zhengly123 changed the title PMU data collection WIP: PMU data collection Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants