ok. Please go ahead with the checkin
Sun

On Mon, Feb 14, 2011 at 11:30 AM, Jian-Xin Lai <laij...@gmail.com> wrote:
> If the value is 4, all functions will be instrumented. This may cause
> the extern inline functions in header files are emitted as strong symbols
> into the generated .s file. There will be 'duplicated symbols' in the final
> linking phase.
> The code in wn_cgy_instrument.cxx is:
>
> // The -OPT:cyg_instr flag indicates how aggresively we will instrument
> // functions:
> //   0 = Don't instrument any functions [default].
> //   1 = Don't instrument functions the gnu front-end selects for inlining.
> //   2 = Don't instrument functions marked "inline" by user.
> //   3 = Don't instrument functions marked "extern inline" or always_inline.
> //   4 = Instrument all functions; disable deletion of "extern inline"
> //       functions.
> // CYG_Instrument_Driver should never be called if OPT_CYG_Instrument < 1.
> // TODO: Move this code to front-end by setting PU_no_instrument flag.
> static BOOL
> Do_cyg_instrument_p( ST *st_func )
> {
>   // Can assume this: if ( OPT_Cyg_Instrument <= 0 ) return FALSE;
>   PU &pu = Pu_Table[ST_pu(st_func)];
>   if ( PU_no_instrument( pu ) ) return FALSE;
>   switch ( OPT_Cyg_Instrument ) {
>   case 1:  return ! PU_is_inline_function( pu );
>   case 2:  return ! PU_is_marked_inline( pu );
>   case 3:  return ! PU_must_inline( pu );
>   default: break;
>   }
>   return TRUE;  // OPT_Cyg_Instrument >= 4
> }
>
>
> 2011/2/12 Sun Chan <sun.c...@gmail.com>
>>
>> what is the diff between 3 and 4?
>> Sun
>>
>> On Sat, Feb 12, 2011 at 4:33 PM, Jian-Xin Lai <laij...@gmail.com> wrote:
>> > Hi,
>> >
>> > Bug 520 is reported and fixed by Ron Lieberman.
>> > https://bugs.open64.net/show_bug.cgi?id=520
>> > Here comes his patch:
>> > Index: osprey/driver/OPTIONS
>> > ===================================================================
>> > --- osprey/driver/OPTIONS       (revision 3475)
>> > +++ osprey/driver/OPTIONS       (working copy)
>> > @@ -2002,7 +2002,7 @@
>> >  -mno-sdata     ;               Cc      NONE    "-G0"
>> >         ""
>> >  #endif
>> > --finstrument-functions ;       ALL     NONE    "-OPT:cyg_instr=4"
>> > +-finstrument-functions ;       ALL     NONE    "-OPT:cyg_instr=3"
>> >         ""
>> >  -finhibit-size-directive       ;               Cc      be
>> > "-CG:inhibit_size_directive=1:emit_asm_dwarf=0"
>> >         "Do not generate .size directives"
>> > Index: osprey/common/com/config_opt.cxx
>> > ===================================================================
>> > --- osprey/common/com/config_opt.cxx    (revision 3475)
>> > +++ osprey/common/com/config_opt.cxx    (working copy)
>> > @@ -458,7 +458,7 @@
>> >      "Optimize generation of barrier calls for OpenMP" },
>> >
>> >    { OVK_INT32, OV_VISIBLE,      TRUE,   "cyg_instr",    "",
>> > -    4, 0, 4, &OPT_Cyg_Instrument, NULL,
>> > +    3, 0, 4, &OPT_Cyg_Instrument, NULL,
>> >      "Insert calls to __cyg_profile_func_enter/exit" },
>> >
>> >    { OVK_BOOL, OV_INTERNAL,     TRUE,   "icall_instr", "",
>> >
>> > Could a gate keeper review this patch so that I can check it in? Thank
>> > you
>> > very much.
>> >
>> > --
>> > Regards,
>> > Lai Jian-Xin
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio
>> > XE:
>> > Pinpoint memory and threading errors before they happen.
>> > Find and fix more than 250 security defects in the development cycle.
>> > Locate bottlenecks in serial and parallel code that limit performance.
>> > http://p.sf.net/sfu/intel-dev2devfeb
>> > _______________________________________________
>> > Open64-devel mailing list
>> > Open64-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/open64-devel
>> >
>> >
>
>
>
> --
> Regards,
> Lai Jian-Xin
>

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to