Skip to content

Commit 7ae7165

Browse files
authored
Remove bespoke timing code in favor of profiler. NFC (#21017)
The old timer here was essentially measuring the cost of compile_javascript. Using the standard profiling decorator does this automatically.
1 parent a6e638d commit 7ae7165

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tools/emscripten.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import os
1515
import json
1616
import subprocess
17-
import time
1817
import logging
1918
import pprint
2019
import shutil
@@ -172,6 +171,7 @@ def apply_static_code_hooks(forwarded_json, code):
172171
return code
173172

174173

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

365-
if DEBUG:
366-
logger.debug('emscript: js compiler glue')
367-
t = time.time()
368-
369365
# memory and global initializers
370366

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

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

394387
forwarded_json = json.loads(forwarded_data)
395388

0 commit comments

Comments
 (0)