-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
[Truffle] Adding Unique IDs to neverDesignedForCompilation to trace #2656
Conversation
@chrisseaton I think with these options I could only trace the first optfail that occurs. |
👍 for adding the reason, but I think a descriptive comment is quite more helpful and less cryptic. |
@eregon I agree something descriptive would be more useful (still should be a unique message though). |
Maybe we could just derive some description from the node class name or the particular specialization node? Or use the backtrace if the Truffle description with |
@eregon also 👍 , I wish this was provided: "Graal/Truffle should really provide that if possible." |
Maybe I'm missing something, but if Truffle auto-generated the ID, how would you grep through the source for it? |
@eregon I tried using the node to get a backtrace but for some reason this was causing Graal to just hang when run @nirvdrum I think he's thinking something like a backtrace line number This is the script I used to update these require 'securerandom'
files = Dir.glob("truffle/**/*.java")
puts files.size
puts files.to_s
files.each do |filepath|
text = File.read(filepath)
replace = text.gsub(/notDesignedForCompilation\(\);/) { |num| "notDesignedForCompilation(\"#{SecureRandom.uuid.gsub('-','')}\");" }
File.open(filepath, "w") {|file| file.puts replace}
end |
@bjfish do you have a particular example at hand so we can compare the alternatives? |
@bjfish That's us generating the ID, which I'm actually okay with. |
@eregon Sorry, I don't think I have anything to compare. The dynamic stuff I've tried just causes Graal to hang / be really slow. |
@bjfish we really appreciate this PR but we don't think it's right for the project. I think the unique identifiers in the source code look really out of place and really the emphasis should be on removing these We do understand your use case though, and we'll look at adding an option to Graal that prints the backtrace that you get with Since you have your script, you can actually keep running that locally and then just not commit the results if you want to. |
This is just an idea in case you like it @chrisseaton
Add this method to RubyNode -
Add Unique ID to notDesignedForCompilation method in All Methods -
Graal Output includes Unique IDs to trace which method caused the optfail