It's complicated and for the details, you'll have to look at build
configuration files (start with BUILD.gn and gni/v8.gni, if needed continue
with generated .ninja files in the output directory), but the short answer
is that the three build modes affect C++ compilation as follows:
release: -O3
debug: -O0 -DDEBUG
optdebug: -O2 -DDEBUG
Additionally, there is a flag --debug-code that controls whether extra
checks are emitted in generated code. It is on by default in when DEBUG is
defined, and off by default otherwise, but can be overridden.
So for your purposes, you probably want an optdebug build and the
--nodebug-code command-line flag.

Please double-check everything I've said here before blindly trusting any
results.


On Wed, May 29, 2019 at 1:52 AM Sunghyun Park <sun...@umich.edu> wrote:

> Hi, all.
>
> I'm trying to count the number of dynamic instructions for jitted code in
> V8 by using PIN.
> Since PIN leverages symbol table to identify jitted code, I needed to
> compile V8 with debug mode to provide information for the symbol table.
>
> However, I'm not sure whether debug mode applies the same level of
> optimization as release mode.
> I spent some time searching, but I couldn't find any useful information.
> Is there anyone who can clarify the difference between
> release/debug/optdebug in V8?
> Any advice would be greatly helpful.
>
> Thank you!
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-users/88fe04cf-252e-4d1d-9199-6cc868e3723b%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-users/88fe04cf-252e-4d1d-9199-6cc868e3723b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/CAKSzg3QKOUkL8TJX_9d3m57b7jUrUiK2qq3fOZuEuc5Y95rhyw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to