@@ -1055,16 +1055,16 @@ bool linux_launchmon_t::handle_mpir_variables(
10551055 p.set_launch_hidden_bp (NULL );
10561056 }
10571057 la_bp = new linux_breakpoint_t ();
1058- la_bp->set_address_at (launch_bp_sym.get_relocated_address ());
1058+ la_bp->set_address_at (launch_bp_sym.get_relocated_lowest_address ());
10591059
10601060#if PPC_ARCHITECTURE
10611061 //
10621062 // DHA Mar 05 2009
10631063 // PowerPC Linux has begun to change the linking convention
10641064 // such that binaries no longer export direct function
10651065 // symbols. (e.g., .MPIR_Breakpoint). But rather, undotted
1066- // global data symbols (e.g., MPIR_Breakpoint) contains the
1067- // address for the corresponding function.
1066+ // global data symbols (e.g., MPIR_Breakpoint) is the function
1067+ // descriptor
10681068 //
10691069 // Added indirect breakpoint support for that and use this
10701070 // method on all PPC systems across the board including
@@ -1486,16 +1486,15 @@ launchmon_event_e linux_launchmon_t::decipher_an_event(
14861486 //
14871487 // Parent gets SIGTRAP when a new thread is created
14881488 // Used to be: return_ev = LM_STOP_NOT_INTERESTED;
1489- int upper16;
1490- upper16 = event.get_rawstatus () >> 16 ;
1491- if (upper16 == LINUX_TRACER_EVENT_CLONE) {
1489+ int high = event.get_rawstatus () >> 8 ;
1490+ if (high == (SIGTRAP | (LINUX_TRACER_EVENT_CLONE << 8 ))) {
14921491 return_ev = LM_STOP_AT_THREAD_CREATION;
1493- } else {
1494- //
1495- // SIGTRAP due to fork for example
1496- //
1497- return_ev = LM_STOP_NOT_INTERESTED;
1498- }
1492+ } else {
1493+ //
1494+ // SIGTRAP due to fork for example
1495+ //
1496+ return_ev = LM_STOP_NOT_INTERESTED;
1497+ }
14991498 } else if (event.get_signum () == SIGSTOP) {
15001499 return_ev = LM_RELAY_SIGNAL;
15011500
@@ -1578,12 +1577,13 @@ launchmon_rc_e linux_launchmon_t::handle_trap_after_attach_event(
15781577
15791578#if MEASURE_TRACING_COST
15801579 beginTS = gettimeofdayD ();
1580+ #endif
1581+
15811582 {
1582- self_trace_t::trace (true , // print always
1583+ self_trace_t::trace (LEVELCHK (level2),
15831584 MODULENAME, 0 ,
15841585 " The RM process has just been trapped due to attach" );
15851586 }
1586- #endif
15871587
15881588 bool use_cxt = true ;
15891589 image_base_t <T_VA, elf_wrapper> *dynloader_im = NULL ;
@@ -1649,7 +1649,7 @@ launchmon_rc_e linux_launchmon_t::handle_trap_after_attach_event(
16491649 dynloader_im->get_a_symbol (p.get_loader_breakpoint_sym ());
16501650
16511651 lo_bp = new linux_breakpoint_t ();
1652- addr_dl_bp = dynload_sym.get_relocated_address ();
1652+ addr_dl_bp = dynload_sym.get_relocated_lowest_address ();
16531653 lo_bp->set_address_at (addr_dl_bp);
16541654#if PPC_ARCHITECTURE
16551655 lo_bp->set_use_indirection ();
@@ -1781,9 +1781,9 @@ launchmon_rc_e linux_launchmon_t::handle_trap_after_exec_event(
17811781#endif
17821782
17831783 {
1784- self_trace_t::trace (true , // print always
1785- MODULENAME, 0 ,
1786- " The RM process has just been forked and exec'ed." );
1784+ self_trace_t::trace (LEVELCHK (level2),
1785+ MODULENAME, 0 , " The RM process (%d) has "
1786+ " just been forked and exec'ed." , p. get_pid ( true ) );
17871787 }
17881788
17891789 bool use_cxt = true ;
@@ -1830,7 +1830,7 @@ launchmon_rc_e linux_launchmon_t::handle_trap_after_exec_event(
18301830//
18311831// Corner case; we deal with a heuristics
18321832//
1833- #if PPC_ARCHITECTURE
1833+ #if PPC_ARCHITECTURE || POWERLE_ARCHITECTURE
18341834 //
18351835 // DHA Mar 05 2009
18361836 // There're systems that do not directly
@@ -1858,7 +1858,7 @@ launchmon_rc_e linux_launchmon_t::handle_trap_after_exec_event(
18581858#else
18591859 = p.get_gprset (use_cxt)->get_pc () & 0xffff0000 ;
18601860#endif
1861- #else /* PPC_ARCHITECTURE */
1861+ #else /* PPC_ARCHITECTURE || POWERLE_ARCHITECTURE */
18621862 //
18631863 // This requires the actual page size to compute this loader load
18641864 // address implictly. Just using the following bits for now.
@@ -1915,13 +1915,13 @@ launchmon_rc_e linux_launchmon_t::handle_trap_after_exec_event(
19151915 countHandler++;
19161916 // accum and countHandler now contain the cost of this handler which
19171917 // is invoked just once per job
1918- #endif
1919-
19201918 {
19211919 self_trace_t::trace (
19221920 true , // print always
19231921 MODULENAME, 0 , " Just continued the RM process out of the first trap" );
19241922 }
1923+ #endif
1924+
19251925
19261926 set_last_seen (gettimeofdayD ());
19271927 return LAUNCHMON_OK;
@@ -2652,12 +2652,19 @@ launchmon_rc_e linux_launchmon_t::handle_thrcreate_request(
26522652 memset (&tinfo, ' \0 ' , sizeof (tinfo));
26532653 tinfo.ti_lid = (lwpid_t )newlwpid;
26542654
2655+ {
2656+ self_trace_t::trace (LEVELCHK (level2), MODULENAME,0 ,
2657+ " thread creation request event handler "
2658+ " invoked for thread (%d)" , newlwpid);
2659+ }
2660+
2661+
26552662 if (p.get_thrlist ().find (tinfo.ti_lid ) == p.get_thrlist ().end ()) {
26562663// this thread has not been seen
26572664#if X86_ARCHITECTURE || X86_64_ARCHITECTURE
26582665 thread_base_t <SDBG_LINUX_DFLT_INSTANTIATION> *thrinfo =
26592666 new linux_x86_thread_t ();
2660- #elif PPC_ARCHITECTURE
2667+ #elif PPC_ARCHITECTURE || POWERLE_ARCHITECTURE
26612668 thread_base_t <SDBG_LINUX_DFLT_INSTANTIATION> *thrinfo =
26622669 new linux_ppc_thread_t ();
26632670#elif AARCH64_ARCHITECTURE
0 commit comments