Merge pull request #625 from lemmaa/master
Fix MEM_STATS build configuration.
This commit is contained in:
@@ -1330,7 +1330,7 @@ jerry_init (jerry_flag_t flags) /**< combination of Jerry flags */
|
||||
#endif /* !JERRY_ENABLE_LOG */
|
||||
}
|
||||
|
||||
if (flags & (JERRY_FLAG_MEM_STATS))
|
||||
if (flags & (JERRY_FLAG_MEM_STATS | JERRY_FLAG_MEM_STATS_PER_OPCODE | JERRY_FLAG_MEM_STATS_SEPARATE))
|
||||
{
|
||||
#ifndef MEM_STATS
|
||||
flags &= ~(JERRY_FLAG_MEM_STATS
|
||||
@@ -1338,14 +1338,12 @@ jerry_init (jerry_flag_t flags) /**< combination of Jerry flags */
|
||||
| JERRY_FLAG_MEM_STATS_SEPARATE);
|
||||
|
||||
JERRY_WARNING_MSG ("Ignoring memory statistics option because of '!MEM_STATS' build configuration.\n");
|
||||
#endif /* !MEM_STATS */
|
||||
}
|
||||
else if (flags & (JERRY_FLAG_MEM_STATS_PER_OPCODE | JERRY_FLAG_MEM_STATS_SEPARATE))
|
||||
{
|
||||
flags &= ~(JERRY_FLAG_MEM_STATS_PER_OPCODE | JERRY_FLAG_MEM_STATS_SEPARATE);
|
||||
|
||||
JERRY_WARNING_MSG (
|
||||
"Ignoring detailed memory statistics options because memory statistics dump mode is not enabled.\n");
|
||||
#else /* !MEM_STATS */
|
||||
if (flags & (JERRY_FLAG_MEM_STATS_PER_OPCODE | JERRY_FLAG_MEM_STATS_SEPARATE))
|
||||
{
|
||||
flags |= JERRY_FLAG_MEM_STATS;
|
||||
}
|
||||
#endif /* MEM_STATS */
|
||||
}
|
||||
|
||||
jerry_flags = flags;
|
||||
|
||||
Reference in New Issue
Block a user