Skip to content

Commit

Permalink
Remove bespoke timing code in favor of profiler. NFC (#21017)
Browse files Browse the repository at this point in the history
The old timer here was essentially measuring the cost of
compile_javascript.  Using the standard profiling decorator does this
automatically.
  • Loading branch information
sbc100 authored Jan 5, 2024
1 parent a6e638d commit 7ae7165
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions tools/emscripten.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import os
import json
import subprocess
import time
import logging
import pprint
import shutil
Expand Down Expand Up @@ -172,6 +171,7 @@ def apply_static_code_hooks(forwarded_json, code):
return code


@ToolchainProfiler.profile()
def compile_javascript(symbols_only=False):
stderr_file = os.environ.get('EMCC_STDERR_FILE')
if stderr_file:
Expand Down Expand Up @@ -362,10 +362,6 @@ def emscript(in_wasm, out_wasm, outfile_js, js_syms, finalize=True):
logger.debug('emscript: skipping remaining js glue generation')
return

if DEBUG:
logger.debug('emscript: js compiler glue')
t = time.time()

# memory and global initializers

if settings.RELOCATABLE:
Expand All @@ -387,9 +383,6 @@ def emscript(in_wasm, out_wasm, outfile_js, js_syms, finalize=True):
settings.DEFAULT_LIBRARY_FUNCS_TO_INCLUDE += ['$getWasmTableEntry']

glue, forwarded_data = compile_javascript()
if DEBUG:
logger.debug(' emscript: glue took %s seconds' % (time.time() - t))
t = time.time()

forwarded_json = json.loads(forwarded_data)

Expand Down

0 comments on commit 7ae7165

Please sign in to comment.