ruby-changes:52114
From: k0kubun <ko1@a...>
Date: Sun, 12 Aug 2018 23:42:31 +0900 (JST)
Subject: [ruby-changes:52114] k0kubun:r64322 (trunk): mjit_worker.c: allow showing line number
k0kubun 2018-08-12 23:42:25 +0900 (Sun, 12 Aug 2018) New Revision: 64322 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64322 Log: mjit_worker.c: allow showing line number on addr2line.c, if --jit-save-temps is specified. I'm going to use the line number to lazily create program counter to improve the performance degraded in r64283. Modified files: trunk/mjit_worker.c Index: mjit_worker.c =================================================================== --- mjit_worker.c (revision 64321) +++ mjit_worker.c (revision 64322) @@ -254,11 +254,20 @@ static const char *const CC_COMMON_ARGS[ https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L254 #define CC_PATH CC_COMMON_ARGS[0] static const char *const CC_DEBUG_ARGS[] = {MJIT_DEBUGFLAGS NULL}; -static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS NULL}; +static const char *const CC_OPTIMIZE_ARGS[] = { + MJIT_OPTFLAGS +#ifdef USE_ELF /* at least -g1 is required to get line number on addr2line.c, and -g (-g2) is slow. */ + "-g1", +#endif + NULL +}; static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED GCC_PIC_FLAGS NULL}; static const char *const CC_DLDFLAGS_ARGS[] = { MJIT_DLDFLAGS +#ifdef USE_ELF /* force disable compression to get line number on addr2line.c */ + "-Wl,--compress-debug-sections=none", +#endif #if defined __GNUC__ && !defined __clang__ "-nostartfiles", # if !defined(_WIN32) && !defined(__CYGWIN__) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/