add -profiling option
This commit is contained in:
Родитель
ccbfbc922a
Коммит
355a67d3a1
12
emcc
12
emcc
|
@ -235,6 +235,13 @@ Options that are modified or new in %s include:
|
|||
slower because JS optimization will be
|
||||
limited to 1 core. (default in -O0)
|
||||
|
||||
-profiling Use reasonable defaults when emitting JS to
|
||||
make the build useful for profiling. This
|
||||
sets -g2 (preserve function names) and may
|
||||
also enable optimizations that affect
|
||||
performance and otherwise might not be
|
||||
performed in -g2.
|
||||
|
||||
--typed-arrays <mode> 0: No typed arrays
|
||||
1: Parallel typed arrays
|
||||
2: Shared (C-like) typed arrays (default)
|
||||
|
@ -770,6 +777,7 @@ try:
|
|||
|
||||
opt_level = 0
|
||||
debug_level = 0
|
||||
profiling = False
|
||||
js_opts = None
|
||||
llvm_opts = None
|
||||
llvm_lto = None
|
||||
|
@ -890,6 +898,10 @@ try:
|
|||
requested_level = newargs[i][2:] or '3'
|
||||
debug_level = validate_arg_level(requested_level, 4, 'Invalid debug level: ' + newargs[i])
|
||||
newargs[i] = '-g' # we'll need this to get LLVM debug info
|
||||
elif newargs[i] == '-profiling':
|
||||
debug_level = 2
|
||||
profiling = True
|
||||
newargs[i] = ''
|
||||
elif newargs[i] == '--bind':
|
||||
bind = True
|
||||
newargs[i] = ''
|
||||
|
|
|
@ -191,6 +191,7 @@ Options that are modified or new in %s include:
|
|||
(['-O2', '-g1'], lambda generated: 'var b = 0' in generated and not 'function _main' in generated, 'compress is cancelled by -g1'),
|
||||
(['-O2', '-g2'], lambda generated: ('var b = 0' in generated or 'var i1 = 0' in generated) and 'function _main' in generated, 'minify is cancelled by -g2'),
|
||||
(['-O2', '-g3'], lambda generated: 'var b=0' not in generated and 'var b = 0' not in generated and 'function _main' in generated, 'registerize is cancelled by -g3'),
|
||||
(['-O2', '-profiling'], lambda generated: ('var b = 0' in generated or 'var i1 = 0' in generated) and 'function _main' in generated, 'similar to -g2'),
|
||||
#(['-O2', '-g4'], lambda generated: 'var b=0' not in generated and 'var b = 0' not in generated and 'function _main' in generated, 'same as -g3 for now'),
|
||||
(['-s', 'INLINING_LIMIT=0'], lambda generated: 'function _dump' in generated, 'no inlining without opts'),
|
||||
(['-s', 'USE_TYPED_ARRAYS=0'], lambda generated: 'new Int32Array' not in generated, 'disable typed arrays'),
|
||||
|
|
Загрузка…
Ссылка в новой задаче