Skip to content

Commit

Permalink
[GR-21031] Making T-Trace sources debuggable.
Browse files Browse the repository at this point in the history
PullRequest: graal/5509
  • Loading branch information
Jaroslav Tulach committed Feb 18, 2020
2 parents b7c9669 + e91fad9 commit 5291652
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected void onCreate(Env tmp) {
if (lang == null) {
throw AgentException.notRecognized(file);
}
return Source.newBuilder(lang, file).uri(file.toUri()).internal(true).name(file.getName()).build();
return Source.newBuilder(lang, file).uri(file.toUri()).name(file.getName()).build();
} catch (IOException ex) {
throw AgentException.raise(ex);
}
Expand Down
6 changes: 6 additions & 0 deletions vm/tests/all/agentscript/agent-exception.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
Hello T-Trace.
How
great you are!
.*at <js> checkLogging.agent-exception.js:.*
.*at <js> log.log.js:1-6:18-.*
.*at <js> howAreYou.log.js:11:.*.

>[7] js --experimental-options --agentscript=agent-exception.js -f log.js -e "howAreYou()"
Hello T-Trace.
How
great you are!
.*at <js> checkLogging.agent-exception.js:.*
.*at <js> log.log.js:1-6:18-.*
.*at <js> howAreYou.log.js:11:.*

Expand All @@ -17,13 +19,15 @@ Hello T-Trace!
How
do
you feel?
.*at <js> checkLogging.agent-exception.js:.*
.*at <js> log.log.js:1-6:18-.*
.*at <js> howDoYouDo.log.js:18:.*
.*at <js> :program.<eval_script>:1:0-11.
>[7] js --experimental-options --agentscript=agent-exception.js -f log.js -e "areYouBad()"
Hello T-Trace!
How
good you are?
.*at <js> checkLogging.agent-exception.js:.*
.*at <js> log.log.js:1-6:.*
.*at <js> areYouBad.log.js:26:.*
.*at <js> :program.<eval_script>:1:0-10.
Expand All @@ -33,7 +37,9 @@ agentscript: Unknown attribute misnamedAttribute
agentscript: Unknown event type 'enterOrLeave'.*
>[7] js --jvm --experimental-options --agentscript=agent-error.js log.js
Error while initializing {id: "agentscript", version: "0.4"}
.*at <js> :anonymous.*agent-error.js.*
.*at <js> .*Unknown.*
>[7] js --experimental-options --agentscript=agent-error.js log.js
Error while initializing {id: "agentscript", version: "0.4"}
.*at <js> :anonymous.*agent-error.js.*
.*at <js> .*Unknown.*
6 changes: 3 additions & 3 deletions vm/tests/all/agentscript/agent-ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ var counter = 0;

function ping() {
console.log(`Ping ${++counter}`);
setTimeout(ping, 1000);
setTimeout(ping, 5000);
}
setTimeout(ping, 1000);
setTimeout(ping, 5000);

// define T-Trace script via curl anytime later:
function connect() {
Expand All @@ -17,4 +17,4 @@ function connect() {
const { exec } = require('child_process');
exec(cmd);
}
setTimeout(connect, 2500);
setTimeout(connect, 12500);

0 comments on commit 5291652

Please sign in to comment.