Make ServerCommandLwt report different stack
Summary:
The stack-traces I get from ServerCommandLwt are pretty awful due to asyncness, e.g.
```
[2019-07-29 17:47:35.657] [client-lsp] Starting clientLsp at /tmp/hh_server/zSdatazSsandcastlezSboxeszSwww.client_lsp_log
[2019-07-29 17:47:56.259] [client-lsp] Exception: message: End_of_file, stack trace: Raised at file "string.ml", line 114, characters 19-34
Called from file "sexp.ml", line 112, characters 13-47
---
Raised by primitive operation at file "stdlib.ml", line 390, characters 28-54
Called from file "stdlib.ml" (inlined), line 398, characters 2-47
Called from file "/mnt/btrfs/trunk-hg-fbcode-fbsource-
61774532-
1564138723/fbcode/hphp/hack/src/client/clientConnect.ml", line 46, characters 13-54
---
```
This diff changes it to capture the callstack at the start of the method, before any async resumptions have happened. This is a nicer callstack - it shows where in clientLsp actually called this code.
It's more expensive to gather the callstack in advance. But we're only doing it at the moment when clientLsp calls "rpc", which is of the order of magnitude of human actions, so I don't think that's an issue.
Reviewed By: 2BitSalute
Differential Revision:
D16567199
fbshipit-source-id:
44f85241db0c4e13cbca3f4521133dd8c1bbc6cc