Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for per-instruction memory statistics #954

Conversation

akosthekiss
Copy link
Member

The new CBC interpreter does not support it anymore.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]

@akosthekiss akosthekiss added the interpreter Related to the virtual machine label Mar 10, 2016
@@ -36,8 +36,7 @@ extern "C"
#define JERRY_FLAG_SHOW_OPCODES (1u << 0) /**< dump byte-code to stdout after parse */
#define JERRY_FLAG_MEM_STATS (1u << 1) /**< dump memory statistics */
#define JERRY_FLAG_MEM_STATS_PER_OPCODE (1u << 2) /**< dump per-instruction memory statistics during execution
* (in the mode full GC is performed after execution of each
* opcode handler) */
* FIXME: Remove. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure whether I should renumber all unrelated flags or leave an unused hole in the bits. But I'd go for the renumbering then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also change the style of the flags to be an enum?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that these are bit flags that can be combined (or'd). Do we use enums for such constructs? If we'd like to go for a change then bitfield structs seem a better fit to me. If.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See re_flags_t and ecma_property_flags_t

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also prefer enum. see vm/vm.h
LGTM after that

@akosthekiss akosthekiss force-pushed the remove-mem-stats-per-opcode branch from cb672e9 to 11dc376 Compare March 10, 2016 11:03
@akosthekiss
Copy link
Member Author

Updated according to the reviews.

The new CBC interpreter does not support it anymore, thus removing
related code.

(As a side-effect, `jerry_flag_t` has been refactored from
`uint32_t` and associated defines to an enum.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]
@akosthekiss akosthekiss force-pushed the remove-mem-stats-per-opcode branch from 11dc376 to 6e687fa Compare March 10, 2016 12:20
@LaszloLango
Copy link
Contributor

LGTM

1 similar comment
@zherczeg
Copy link
Member

LGTM

@akosthekiss akosthekiss merged commit 6e687fa into jerryscript-project:master Mar 10, 2016
@akosthekiss akosthekiss deleted the remove-mem-stats-per-opcode branch March 10, 2016 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter Related to the virtual machine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants