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

Ability to set DebugProbes.enableCreationStackTraces using system property #3648

Closed
develar opened this issue Feb 28, 2023 · 5 comments
Closed

Comments

@develar
Copy link

develar commented Feb 28, 2023

The property kotlinx.coroutines.debug.enable.creation.stack.trace is used only by AgentPremain, but not by DebugProbes.enableCreationStackTraces.

It will be great if will be no need to use DebugProbes.enableCreationStackTraces = false in the code.

Related to #3633

@develar develar added the bug label Feb 28, 2023
@qwwdfsad qwwdfsad added enhancement and removed bug labels Feb 28, 2023
@qwwdfsad
Copy link
Contributor

That is good point, we probably have to rethink that.
As well the idea of having creation stacktrace enabled by default; to be honest, I've never heard it helped anybody, but it takes quite lot of performance from debugger for marginal benefit

@qwwdfsad qwwdfsad added the debug label Feb 28, 2023
@qwwdfsad
Copy link
Contributor

Was kindly asked to squeeze it into 1.7.2

PavlovIvan added a commit to PavlovIvan/kotlinx.coroutines that referenced this issue May 27, 2023
@qwwdfsad
Copy link
Contributor

We decided not to fix it in 1.7.2: it seems rather ad-hoc and the rationale is not sufficient, see: #3764 (comment)

But we also plan to disable creation stacktraces by default: #3783

@qwwdfsad qwwdfsad closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2023
@develar
Copy link
Author

develar commented Jun 28, 2023

Disabling by default can take much time, not in 1.7.2, right? Anyway, I answered in that thread.

@dovchinnikov
Copy link
Contributor

The main reason for this request was an (incorrect) assumption that substituting kotlin.coroutines.jvm.internal.DebugProbesKt with DebugProbesKt.bin via our own classloader implementation will automatically enable the debugging facility. It turned out, that even with the substitution, we still need to call install to start the cleaner thread, and we need to set AgentInstallationType to avoid loading byte buddy, so we might as well set enableCreationStackTraces to false in the neighbour line.

Please close this as obsolete.

@dkhalanskyjb dkhalanskyjb closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants