-
Notifications
You must be signed in to change notification settings - Fork 34
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
Improve trace representation: show non-this
object instances on method calls and show field names when using VarHandle
, AtomicReference
, andUnsafe
#325
Improve trace representation: show non-this
object instances on method calls and show field names when using VarHandle
, AtomicReference
, andUnsafe
#325
Conversation
…micReference methods trace points made more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a significant UX improvement! I've passed over most of the changes. Please address the comments.
LincheckJavaAgent.ensureObjectIsTransformed(testInstance) | ||
ensuredTestInstanceIsTransformed = true | ||
if (strategy is ModelCheckingStrategy) { | ||
strategy.initializeCallStack(testInstance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this change, the comment above is incorrect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides, it's unclear what this call does and why you need it in the runner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this logic added to Runner instead of ManagedStrategy.initializeInvocation?
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/AtomicFieldUpdaterNames.kt
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/transformation/LincheckClassVisitor.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/util/UnsafeHolder.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/TraceReporter.kt
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ObjectNumerator.kt
Outdated
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Show resolved
Hide resolved
src/jvm/test/resources/expected_logs/varhandle_representation.txt
Outdated
Show resolved
Hide resolved
LincheckJavaAgent.ensureObjectIsTransformed(testInstance) | ||
ensuredTestInstanceIsTransformed = true | ||
if (strategy is ModelCheckingStrategy) { | ||
strategy.initializeCallStack(testInstance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this logic added to Runner instead of ManagedStrategy.initializeInvocation?
|
||
private fun simpleClassName(className: String) = className.takeLastWhile { it != '/' } | ||
|
||
private fun initializeUnsafeMethodCallTracePoint( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initialize or create?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initialize because it's created previously in the common logic part.
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Show resolved
Hide resolved
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve the PR, but we need to address the remaining comments. @avpotapov00
this
object instances on method calls and show field names when using VarHandle
, AtomicReference
, andUnsafe
Closes #315 , #317 , #320 and #324