58 Commits

Author SHA1 Message Date
AlanSl
77e197d5df Move regex out of inner closure 2018-10-01 14:35:05 +01:00
AlanSl
00cb6a2e19 Don't leave isolate log debris if command errors 2018-09-30 12:25:03 +01:00
Ruben Bridgewater
d5c0d06592
Dry node path 2018-09-19 19:18:56 +02:00
Ruben Bridgewater
ce46db50e3
fixup 2018-09-19 18:58:54 +02:00
Ruben Bridgewater
e885726a7f
Fix linting errors 2018-09-19 10:22:48 +02:00
Ruben Bridgewater
84d287f466
Simplify statement
This fixes a kind of bug: the actual comparison was never used in the
if statement but only the result of `code | 0` since the equality
comparison was executed before the binary operator. Since the result
is fine by using only the binary operator, let's remove the equality
check.
2018-09-19 09:58:06 +02:00
Ruben Bridgewater
436500c5f1
Remove dead code 2018-09-19 09:58:06 +02:00
Matteo Collina
0a5eb02a0e Revert "Merge pull request #165 from BridgeAR/filter-init"
This reverts commit be8e703b03ed86d0252d3a32399fef17a415a485, reversing
changes made to 2bbc814beeee89693f2a55764a5c41ce22d54a61.
2018-09-18 15:59:54 +02:00
Ruben Bridgewater
429efd057c
Make sure the same Node.js executable is used
So far the child process spawned to vizualize the data could be a
different one than the one used to run 0x. Now it's always the same
and there should be no mismatch left.

Fixes: #119
2018-09-18 00:57:14 +02:00
Ruben Bridgewater
a4ec02b758
Add cluster error when running kernel tracing 2018-09-11 15:43:46 +02:00
Ruben Bridgewater
70af5b7c13
Minimal clean up 2018-09-11 15:43:46 +02:00
Ruben Bridgewater
b1bd95fadd
Remove trailing whitespace 2018-09-11 15:43:46 +02:00
Matteo Collina
50abc36aec
Merge pull request #154 from goto-bus-stop/fix/136
Send SIGTERM to subprocess on second Ctrl+C
2018-08-24 12:00:09 +02:00
Renée Kooi
fb59f94773
Throw error if a cluster subprocess is forked
0x doesn't support it.

I used the 'fork' event because it's easier than intercepting `require`
and this way it allows requiring but not using `cluster`.
If the subprocess does `try { cluster.fork() }` this won't crash, but
that's probably fine? Same if the subprocess has an 'uncaughtException'
handler.

Ex:

```
➜  ./cmd.js cluster.js
🔥  Profiling/home/goto-bus-stop/Code/nearform/0x/lib/preload/no-cluster.js:4
  throw new Error('0x does not support clustering.')
  ^
Error: 0x does not support clustering.
    at EventEmitter.cluster.on (/home/goto-bus-stop/Code/nearform/0x/lib/preload/no-cluster.js:4:9)
    at EventEmitter.emit (events.js:182:13)
    at emitForkNT (internal/cluster/master.js:226:11)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:266:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
🚫  Target subprocess error, code: 1
```
2018-08-24 11:32:10 +02:00
Renée Kooi
7eb799ca25
Move forceClose to after softClose to mirror the call order 2018-08-24 11:01:51 +02:00
Renée Kooi
9fb09d4fbe
Wait for subprocess end when --on-port is used. 2018-08-24 10:54:51 +02:00
Renée Kooi
9f44699e48
Force close stuck programs on second SIGINT 2018-08-24 10:46:52 +02:00
Renée Kooi
b67df03ceb
Accept FUNCTION SOURCE identifiers mid-line
Reading v8 output from the stdout stream of a child process is sometimes
unreliable, chunks may be missing. The next `FUNCTION SOURCE` can be in
the middle of a previous `FUNCTION SOURCE`, cutting it off. The impact
can be alleviated slightly by accepting `FUNCTION SOURCE` identifiers
that occur in the middle of a line. It's not 100% accurate, because the
missing chunks may contain other `FUNCTION SOURCE` blocks, so we can
still be missing out on stuff. But, at least we don't dump function
source code to the shell anymore.

When this happens, the previous FUNCTION SOURCE block will not have been
closed by an END line, but END lines only set
`stdoutIsPrintOptSourceOutput` to false, and FUNCTION SOURCE lines set
it to true, so we don't have to do anything there.

Related to but does not quite fix #122
2018-08-22 15:38:29 +02:00
Mathias Buus
afd1466a78 fix signalling on windows 2018-07-24 21:58:16 +02:00
Mathias Buus
c94b8f346e allow onPort to be a function 2018-07-17 15:29:33 +02:00
Matteo Collina
79b5595b09 Fixed windows resource busy bug
Fixes #127.
2018-05-10 10:05:38 +02:00
David Mark Clements
b243845aa4
Merge pull request #116 from thlorenz/fix-perf-error
fix: error correcting perf not found error message
2018-04-12 22:14:06 +02:00
davidmarkclements
5db77bd6ae bugfix closes #117 2018-04-08 23:31:11 +02:00
Thorsten Lorenz
3251efbae4 fix: error correcting perf not found error message 2018-04-04 16:02:09 -06:00
davidmarkclements
75b4192742 macOS bugfix 2018-04-02 21:12:32 +02:00
davidmarkclements
c32c7a91dc improve inlinable capturing, now allows for other v8 to stdout, e.g. --trace-opt etc 2018-03-24 14:45:44 +01:00
davidmarkclements
0960557d18 bugfix, closes #110 2018-03-24 07:33:43 +01:00
davidmarkclements
f4aa18f4e2 rm phases, include init tier 2018-03-21 03:37:09 +01:00
davidmarkclements
d21aae0211 preload dir 2018-03-20 17:16:04 +01:00
davidmarkclements
a3226f48b0 --on-port full impl 2018-03-20 16:52:43 +01:00
Mathias Buus
a1b9928b2c works-ish 2018-03-19 18:03:00 +01:00
davidmarkclements
9cc5b37de6 readme, ui fixes, api changes 2018-03-16 22:07:45 +01:00
davidmarkclements
f7202ab185 windows fix 2018-03-14 23:19:58 +01:00
davidmarkclements
07e8b39ab3 linting 2018-03-14 01:48:58 +01:00
davidmarkclements
fbbae4470f ui improve, cli improve, final rearranging 2018-03-14 01:25:16 +01:00
davidmarkclements
e48d25261a minor code rearrange 2018-03-12 22:07:18 +01:00
davidmarkclements
717011756c merged and unmerged views! 2018-03-12 13:58:50 +01:00
davidmarkclements
3da01881a2 pre-inlined heuristic - ability to mark functions that are later inlined 2018-03-06 01:20:52 +00:00
davidmarkclements
4cc531d02e eval cat 2018-03-04 21:01:36 +00:00
davidmarkclements
96cac61234 enable all frame types, type filtering improvements 2018-03-02 20:21:35 +00:00
davidmarkclements
cf7f93fca6 redo stack conversion 2018-03-02 01:42:03 +00:00
davidmarkclements
dc2e0675ef kernel tracing interface update 2018-02-28 19:07:42 +00:00
davidmarkclements
4004545cb3 trim api, begin refactor 2018-02-28 01:52:56 +00:00
davidmarkclements
8c31ec1ad8 v8 prof as default, --kernel-tracing flag 2018-02-26 23:53:47 +00:00
davidmarkclements
9017add581 --prof-only 2018-02-11 21:37:13 +00:00
davidmarkclements
9ee0dda251 bug fix 2018-02-08 00:58:35 +00:00
davidmarkclements
192dc1f5a7 bugfix 2018-02-08 00:48:10 +00:00
davidmarkclements
26946b2683 prof viz linuz bug fix 2018-02-08 00:24:22 +00:00
davidmarkclements
ca5b9a474d linux fixes 2018-02-08 00:17:40 +00:00
davidmarkclements
296b4017e9 prof-viz 2018-02-07 19:14:51 +00:00