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

Method returns wrong boolean value #2

Open
lzccc opened this issue Jun 2, 2020 · 1 comment
Open

Method returns wrong boolean value #2

lzccc opened this issue Jun 2, 2020 · 1 comment
Assignees

Comments

@lzccc
Copy link
Contributor

lzccc commented Jun 2, 2020

getSetGuardCondition(String ownerName, String methodName) {
if(entryMethod != null && entryClass != null) {
return methodName.equals(entryMethod) && entryClass.equals(ownerName);
} else if(entryMethod != null) {
return methodName.equals(entryMethod);
}
boolean regular = methodName.equals("main([Ljava/lang/String;)V")
|| methodName.equals("realMain([Ljava/lang/String;)V");
regular = (methodName.equals("run()V") &&
ownerName.equals("net/percederberg/tetris/Game$GameThread"));
return regular;
}
line 569 will overwrite whatever value that set by line 567, this problem will cause endProfiling() in profiler class never be invoked. Should we change line 569 to:

regular =  regular || ((methodName.equals("run()V") &&
        ownerName.equals("net/percederberg/tetris/Game$GameThread")));

?

@VijayKrishna
Copy link
Member

VijayKrishna commented Jun 11, 2020

@lzccc great question. Actually this code needs to be cleaned up, and the correct thing to do here will be to get rid of lines 569 and 570, as they are hardcoded for a single project :) We are able to configure these entry methods and classes for a blinky-core run on the terminal anyway, so such hard coded values here are not necessary.

So, let's do this:

  • I will add some documentation around how pass in configurable entry class and methods to blinky-core
  • @lzccc can you send out a simple PR that removes lines 569 and 570 above? thanks!

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

No branches or pull requests

2 participants