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

Profile #948

Closed
wants to merge 6 commits into from
Closed

Profile #948

wants to merge 6 commits into from

Conversation

arpitbbhayani
Copy link
Contributor

No description provided.

cpu_set_t cpuset;
CPU_ZERO(&cpuset);
CPU_SET(cpu, &cpuset);
pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
Copy link
Contributor

@yashs360 yashs360 Oct 5, 2024

Choose a reason for hiding this comment

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

.nit - For pinning threads, some of these functions are missing for MAC systems and will need to be implemented if we want to be multi platform (specially for local profiling). Meanwhile we can run on Linux machines in current form.
Ref-
https://www.hybridkernel.com/2015/01/18/binding_threads_to_cores_osx.html

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.

3 participants