ui: Update NodeJS and Wasm toolchain

Uprev to Node 14.15.4 and Emscripten 2.0.12.
Also:
- Update the path in buildtools where both are
  checked out, moving them in the os-specific folder.
  This is to match what we do with other binaries and
  to allow using both OSes via docker or other VMs.
- Fix trace_converter.ts to deal with a subtle change
  in the ordering of javascript JS library:
  onRuntimeInitialized is now called *before* the init
  function returns (previously was posted on another
  task). This makes referring to the module object
  by capture an 'undefined mod' exception.
- Inline --em-config has been deprecated, move it to
  a file.
- Move node/npm wrapper scripts to /tools, so in the
  long run we can just tell to PATH=$(pwd)/tools in the
  instructions.
- Make everything consistently use //tools/node.
- Fix a bunch of places that were accidentally using
  the system npm rather than the hermetic one.

Test: manually tested (i) opening trace; (ii) open with
      legacy; (iii) converting and downloading a heapdump
      from the flamegraph.
Change-Id: Ief225ece54ed27a2809a575259ac6908048c07dd
20 files changed
tree: 2e3a421a479f4f7439caaa7e69d67be42611c7b3
  1. .github/
  2. bazel/
  3. build_overrides/
  4. buildtools/
  5. debian/
  6. docs/
  7. examples/
  8. gn/
  9. include/
  10. infra/
  11. protos/
  12. src/
  13. test/
  14. tools/
  15. ui/
  16. .clang-format
  17. .clang-tidy
  18. .gitignore
  19. .gn
  20. .style.yapf
  21. Android.bp
  22. Android.bp.extras
  23. BUILD
  24. BUILD.extras
  25. BUILD.gn
  26. CHANGELOG
  27. codereview.settings
  28. heapprofd.rc
  29. LICENSE
  30. METADATA
  31. MODULE_LICENSE_APACHE2
  32. OWNERS
  33. perfetto.rc
  34. PRESUBMIT.py
  35. README.chromium
  36. README.md
  37. TEST_MAPPING
  38. traced_perf.rc
  39. WORKSPACE
README.md

Perfetto - System profiling, app tracing and trace analysis

Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.

See https://perfetto.dev/docs or the /docs/ directory for documentation.