File tree Expand file tree Collapse file tree 6 files changed +8
-23
lines changed Expand file tree Collapse file tree 6 files changed +8
-23
lines changed Original file line number Diff line number Diff line change @@ -1619,16 +1619,15 @@ jerry_init (jerry_flag_t flags) /**< combination of Jerry flags */
1619
1619
#endif /* !JERRY_ENABLE_LOG */
1620
1620
}
1621
1621
1622
- if (flags & (JERRY_FLAG_MEM_STATS | JERRY_FLAG_MEM_STATS_PER_OPCODE | JERRY_FLAG_MEM_STATS_SEPARATE ))
1622
+ if (flags & (JERRY_FLAG_MEM_STATS | JERRY_FLAG_MEM_STATS_SEPARATE ))
1623
1623
{
1624
1624
#ifndef MEM_STATS
1625
1625
flags &= ~(JERRY_FLAG_MEM_STATS
1626
- | JERRY_FLAG_MEM_STATS_PER_OPCODE
1627
1626
| JERRY_FLAG_MEM_STATS_SEPARATE );
1628
1627
1629
1628
JERRY_WARNING_MSG ("Ignoring memory statistics option because of '!MEM_STATS' build configuration.\n" );
1630
1629
#else /* !MEM_STATS */
1631
- if (flags & ( JERRY_FLAG_MEM_STATS_PER_OPCODE | JERRY_FLAG_MEM_STATS_SEPARATE ) )
1630
+ if (flags & JERRY_FLAG_MEM_STATS_SEPARATE )
1632
1631
{
1633
1632
flags |= JERRY_FLAG_MEM_STATS ;
1634
1633
}
@@ -1735,9 +1734,7 @@ jerry_parse (const jerry_api_char_t *source_p, /**< script source */
1735
1734
}
1736
1735
#endif /* MEM_STATS */
1737
1736
1738
- bool is_show_mem_stats_per_instruction = ((jerry_flags & JERRY_FLAG_MEM_STATS_PER_OPCODE ) != 0 );
1739
-
1740
- vm_init (bytecode_data_p , is_show_mem_stats_per_instruction );
1737
+ vm_init (bytecode_data_p );
1741
1738
1742
1739
return true;
1743
1740
} /* jerry_parse */
@@ -2370,7 +2367,7 @@ jerry_exec_snapshot (const void *snapshot_p, /**< snapshot */
2370
2367
2371
2368
if (header_p -> is_run_global )
2372
2369
{
2373
- vm_init (bytecode_p , false );
2370
+ vm_init (bytecode_p );
2374
2371
2375
2372
ecma_object_t * error_obj_p = NULL ;
2376
2373
Original file line number Diff line number Diff line change @@ -36,8 +36,7 @@ extern "C"
36
36
#define JERRY_FLAG_SHOW_OPCODES (1u << 0) /**< dump byte-code to stdout after parse */
37
37
#define JERRY_FLAG_MEM_STATS (1u << 1) /**< dump memory statistics */
38
38
#define JERRY_FLAG_MEM_STATS_PER_OPCODE (1u << 2) /**< dump per-instruction memory statistics during execution
39
- * (in the mode full GC is performed after execution of each
40
- * opcode handler) */
39
+ * FIXME: Remove. */
41
40
#define JERRY_FLAG_MEM_STATS_SEPARATE (1u << 3) /**< dump memory statistics and reset peak values after parse */
42
41
#define JERRY_FLAG_PARSE_ONLY (1u << 4) /**< parse only, prevents script execution (only for testing)
43
42
* FIXME: Remove. */
Original file line number Diff line number Diff line change @@ -141,11 +141,8 @@ vm_op_set_value (ecma_value_t object, /**< base object */
141
141
* Initialize interpreter.
142
142
*/
143
143
void
144
- vm_init (ecma_compiled_code_t * program_p , /**< pointer to byte-code data */
145
- bool dump_mem_stats ) /**< dump per-instruction memory usage change statistics */
144
+ vm_init (ecma_compiled_code_t * program_p ) /**< pointer to byte-code data */
146
145
{
147
- JERRY_ASSERT (!dump_mem_stats );
148
-
149
146
JERRY_ASSERT (__program == NULL );
150
147
151
148
__program = program_p ;
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ typedef enum
192
192
VM_EXEC_CONSTRUCT , /**< construct a new object */
193
193
} vm_call_operation ;
194
194
195
- extern void vm_init (ecma_compiled_code_t * , bool );
195
+ extern void vm_init (ecma_compiled_code_t * );
196
196
extern void vm_finalize (void );
197
197
extern jerry_completion_code_t vm_run_global (ecma_object_t * * );
198
198
extern ecma_value_t vm_run_eval (ecma_compiled_code_t * , bool );
Original file line number Diff line number Diff line change 1
- /* Copyright 2014-2015 Samsung Electronics Co., Ltd.
1
+ /* Copyright 2014-2016 Samsung Electronics Co., Ltd.
2
2
*
3
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
4
* you may not use this file except in compliance with the License.
@@ -237,10 +237,6 @@ main (int argc,
237
237
{
238
238
flags |= JERRY_FLAG_MEM_STATS ;
239
239
}
240
- else if (!strcmp ("--mem-stats-per-opcode" , argv [i ]))
241
- {
242
- flags |= JERRY_FLAG_MEM_STATS_PER_OPCODE ;
243
- }
244
240
else if (!strcmp ("--mem-stats-separate" , argv [i ]))
245
241
{
246
242
flags |= JERRY_FLAG_MEM_STATS_SEPARATE ;
Original file line number Diff line number Diff line change @@ -185,10 +185,6 @@ int jerryscript_entry (int argc, char *argv[])
185
185
{
186
186
flags |= JERRY_FLAG_MEM_STATS ;
187
187
}
188
- else if (!strcmp ("--mem-stats-per-opcode" , argv [i ]))
189
- {
190
- flags |= JERRY_FLAG_MEM_STATS_PER_OPCODE ;
191
- }
192
188
else if (!strcmp ("--mem-stats-separate" , argv [i ]))
193
189
{
194
190
flags |= JERRY_FLAG_MEM_STATS_SEPARATE ;
You can’t perform that action at this time.
0 commit comments