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

Redo: Add profiling of already running tasks via SIGINFO/SIGUSR1 #44185

Merged
merged 2 commits into from
Feb 15, 2022

Conversation

IanButterworth
Copy link
Sponsor Member

@IanButterworth IanButterworth commented Feb 15, 2022

Redo of #43179 (which has been reverted)
I overlooked buildkite build hangs.

It turns out the precompile script revised during review was bad but for some reason it didn't error on the buildbots, and may have caused the hangs on buildkite. TBC.

@IanButterworth IanButterworth marked this pull request as ready for review February 15, 2022 17:20
@IanButterworth
Copy link
Sponsor Member Author

This appears to have fixed the issue, but CI is behind

@DilumAluthge DilumAluthge merged commit 540a807 into JuliaLang:master Feb 15, 2022
@IanButterworth IanButterworth deleted the ib/profile_snap_2 branch February 15, 2022 20:34
iob = IOBuffer()
ioc = IOContext(IOContext(iob, stdout), :displaysize=>displaysize(stdout))
print(ioc, groupby = [:thread, :task])
Base.print(stdout, String(resize!(iob.data, iob.size)))
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I am not sure where you found the privacy-violating resize! accessor, but we have take! for this:

    Base.print(stdout, String(take!(iob.data)))

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

Great question. I usually do take! I'll try to find where I copied that from.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

I can't find where I got it from.. weird.

Applying suggestions #44199

static double profile_autostop_time = -1.0;
static double profile_peek_duration = 1.0; // seconds

double jl_get_profile_peek_duration(void) {
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

style nit: functions start with { on the next line

Suggested change
double jl_get_profile_peek_duration(void) {
double jl_get_profile_peek_duration(void)
{

}
void jl_set_profile_peek_duration(double t) {
profile_peek_duration = t;
return;
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

style nit: return is not needed

Suggested change
return;

antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request Feb 17, 2022
…iaLang#44185)

* Redo: Add profiling of already running tasks via SIGINFO/SIGUSR1

* fix precompile script
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
…iaLang#44185)

* Redo: Add profiling of already running tasks via SIGINFO/SIGUSR1

* fix precompile script
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
…iaLang#44185)

* Redo: Add profiling of already running tasks via SIGINFO/SIGUSR1

* fix precompile script
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.

None yet

3 participants