1 /*
   2  * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "code/debugInfoRec.hpp"
  27 #include "code/pcDesc.hpp"
  28 #include "gc/shared/collectedHeap.inline.hpp"
  29 #include "gc/shared/space.hpp"
  30 #include "memory/universe.inline.hpp"
  31 #include "oops/oop.inline.hpp"
  32 #include "prims/forte.hpp"
  33 #include "runtime/javaCalls.hpp"
  34 #include "runtime/thread.inline.hpp"
  35 #include "runtime/vframe.hpp"
  36 #include "runtime/vframeArray.hpp"
  37 
  38 // These name match the names reported by the forte quality kit
  39 enum {
  40   ticks_no_Java_frame         =  0,
  41   ticks_no_class_load         = -1,
  42   ticks_GC_active             = -2,
  43   ticks_unknown_not_Java      = -3,
  44   ticks_not_walkable_not_Java = -4,
  45   ticks_unknown_Java          = -5,
  46   ticks_not_walkable_Java     = -6,
  47   ticks_unknown_state         = -7,
  48   ticks_thread_exit           = -8,
  49   ticks_deopt                 = -9,
  50   ticks_safepoint             = -10
  51 };
  52 
  53 #if INCLUDE_JVMTI
  54 
  55 //-------------------------------------------------------
  56 
  57 // Native interfaces for use by Forte tools.
  58 
  59 
  60 #if !defined(IA64) && !defined(PPC64)
  61 
  62 class vframeStreamForte : public vframeStreamCommon {
  63  public:
  64   // constructor that starts with sender of frame fr (top_frame)
  65   vframeStreamForte(JavaThread *jt, frame fr, bool stop_at_java_call_stub);
  66   void forte_next();
  67 };
  68 
  69 
  70 static bool is_decipherable_compiled_frame(JavaThread* thread, frame* fr, nmethod* nm);
  71 static bool is_decipherable_interpreted_frame(JavaThread* thread,
  72                                               frame* fr,
  73                                               Method** method_p,
  74                                               int* bci_p);
  75 
  76 
  77 
  78 
  79 vframeStreamForte::vframeStreamForte(JavaThread *jt,
  80                                      frame fr,
  81                                      bool stop_at_java_call_stub) : vframeStreamCommon(jt) {
  82 
  83   _stop_at_java_call_stub = stop_at_java_call_stub;
  84   _frame = fr;
  85 
  86   // We must always have a valid frame to start filling
  87 
  88   bool filled_in = fill_from_frame();
  89 
  90   assert(filled_in, "invariant");
  91 
  92 }
  93 
  94 
  95 // Solaris SPARC Compiler1 needs an additional check on the grandparent
  96 // of the top_frame when the parent of the top_frame is interpreted and
  97 // the grandparent is compiled. However, in this method we do not know
  98 // the relationship of the current _frame relative to the top_frame so
  99 // we implement a more broad sanity check. When the previous callee is
 100 // interpreted and the current sender is compiled, we verify that the
 101 // current sender is also walkable. If it is not walkable, then we mark
 102 // the current vframeStream as at the end.
 103 void vframeStreamForte::forte_next() {
 104   // handle frames with inlining
 105   if (_mode == compiled_mode &&
 106       vframeStreamCommon::fill_in_compiled_inlined_sender()) {
 107     return;
 108   }
 109 
 110   // handle general case
 111 
 112   int loop_count = 0;
 113   int loop_max = MaxJavaStackTraceDepth * 2;
 114 
 115 
 116   do {
 117 
 118     loop_count++;
 119 
 120     // By the time we get here we should never see unsafe but better
 121     // safe then segv'd
 122 
 123     if (loop_count > loop_max || !_frame.safe_for_sender(_thread)) {
 124       _mode = at_end_mode;
 125       return;
 126     }
 127 
 128     _frame = _frame.sender(&_reg_map);
 129 
 130   } while (!fill_from_frame());
 131 }
 132 
 133 // Determine if 'fr' is a decipherable compiled frame. We are already
 134 // assured that fr is for a java nmethod.
 135 
 136 static bool is_decipherable_compiled_frame(JavaThread* thread, frame* fr, nmethod* nm) {
 137   assert(nm->is_java_method(), "invariant");
 138 
 139   if (thread->has_last_Java_frame() && thread->last_Java_pc() == fr->pc()) {
 140     // We're stopped at a call into the JVM so look for a PcDesc with
 141     // the actual pc reported by the frame.
 142     PcDesc* pc_desc = nm->pc_desc_at(fr->pc());
 143 
 144     // Did we find a useful PcDesc?
 145     if (pc_desc != NULL &&
 146         pc_desc->scope_decode_offset() != DebugInformationRecorder::serialized_null) {
 147       return true;
 148     }
 149   }
 150 
 151   // We're at some random pc in the nmethod so search for the PcDesc
 152   // whose pc is greater than the current PC.  It's done this way
 153   // because the extra PcDescs that are recorded for improved debug
 154   // info record the end of the region covered by the ScopeDesc
 155   // instead of the beginning.
 156   PcDesc* pc_desc = nm->pc_desc_near(fr->pc() + 1);
 157 
 158   // Now do we have a useful PcDesc?
 159   if (pc_desc == NULL ||
 160       pc_desc->scope_decode_offset() == DebugInformationRecorder::serialized_null) {
 161     // No debug information is available for this PC.
 162     //
 163     // vframeStreamCommon::fill_from_frame() will decode the frame depending
 164     // on the state of the thread.
 165     //
 166     // Case #1: If the thread is in Java (state == _thread_in_Java), then
 167     // the vframeStreamCommon object will be filled as if the frame were a native
 168     // compiled frame. Therefore, no debug information is needed.
 169     //
 170     // Case #2: If the thread is in any other state, then two steps will be performed:
 171     // - if asserts are enabled, found_bad_method_frame() will be called and
 172     //   the assert in found_bad_method_frame() will be triggered;
 173     // - if asserts are disabled, the vframeStreamCommon object will be filled
 174     //   as if it were a native compiled frame.
 175     //
 176     // Case (2) is similar to the way interpreter frames are processed in
 177     // vframeStreamCommon::fill_from_interpreter_frame in case no valid BCI
 178     // was found for an interpreted frame. If asserts are enabled, the assert
 179     // in found_bad_method_frame() will be triggered. If asserts are disabled,
 180     // the vframeStreamCommon object will be filled afterwards as if the
 181     // interpreter were at the point of entering into the method.
 182     return false;
 183   }
 184 
 185   // This PcDesc is useful however we must adjust the frame's pc
 186   // so that the vframeStream lookups will use this same pc
 187   fr->set_pc(pc_desc->real_pc(nm));
 188   return true;
 189 }
 190 
 191 
 192 // Determine if 'fr' is a walkable interpreted frame. Returns false
 193 // if it is not. *method_p, and *bci_p are not set when false is
 194 // returned. *method_p is non-NULL if frame was executing a Java
 195 // method. *bci_p is != -1 if a valid BCI in the Java method could
 196 // be found.
 197 // Note: this method returns true when a valid Java method is found
 198 // even if a valid BCI cannot be found.
 199 
 200 static bool is_decipherable_interpreted_frame(JavaThread* thread,
 201                                               frame* fr,
 202                                               Method** method_p,
 203                                               int* bci_p) {
 204   assert(fr->is_interpreted_frame(), "just checking");
 205 
 206   // top frame is an interpreted frame
 207   // check if it is walkable (i.e. valid Method* and valid bci)
 208 
 209   // Because we may be racing a gc thread the method and/or bci
 210   // of a valid interpreter frame may look bad causing us to
 211   // fail the is_interpreted_frame_valid test. If the thread
 212   // is in any of the following states we are assured that the
 213   // frame is in fact valid and we must have hit the race.
 214 
 215   JavaThreadState state = thread->thread_state();
 216   bool known_valid = (state == _thread_in_native ||
 217                       state == _thread_in_vm ||
 218                       state == _thread_blocked );
 219 
 220   if (known_valid || fr->is_interpreted_frame_valid(thread)) {
 221 
 222     // The frame code should completely validate the frame so that
 223     // references to Method* and bci are completely safe to access
 224     // If they aren't the frame code should be fixed not this
 225     // code. However since gc isn't locked out the values could be
 226     // stale. This is a race we can never completely win since we can't
 227     // lock out gc so do one last check after retrieving their values
 228     // from the frame for additional safety
 229 
 230     Method* method = fr->interpreter_frame_method();
 231 
 232     // We've at least found a method.
 233     // NOTE: there is something to be said for the approach that
 234     // if we don't find a valid bci then the method is not likely
 235     // a valid method. Then again we may have caught an interpreter
 236     // frame in the middle of construction and the bci field is
 237     // not yet valid.
 238     if (!method->is_valid_method()) return false;
 239     *method_p = method; // If the Method* found is invalid, it is
 240                         // ignored by forte_fill_call_trace_given_top().
 241                         // So set method_p only if the Method is valid.
 242 
 243     address bcp = fr->interpreter_frame_bcp();
 244     int bci = method->validate_bci_from_bcp(bcp);
 245 
 246     // note: bci is set to -1 if not a valid bci
 247     *bci_p = bci;
 248     return true;
 249   }
 250 
 251   return false;
 252 }
 253 
 254 
 255 // Determine if a Java frame can be found starting with the frame 'fr'.
 256 //
 257 // Check the return value of find_initial_Java_frame and the value of
 258 // 'method_p' to decide on how use the results returned by this method.
 259 //
 260 // If 'method_p' is not NULL, an initial Java frame has been found and
 261 // the stack can be walked starting from that initial frame. In this case,
 262 // 'method_p' points to the Method that the initial frame belongs to and
 263 // the initial Java frame is returned in initial_frame_p.
 264 //
 265 // find_initial_Java_frame() returns true if a Method has been found (i.e.,
 266 // 'method_p' is not NULL) and the initial frame that belongs to that Method
 267 // is decipherable.
 268 //
 269 // A frame is considered to be decipherable:
 270 //
 271 // - if the frame is a compiled frame and a PCDesc is available;
 272 //
 273 // - if the frame is an interpreter frame that is valid or the thread is
 274 //   state (_thread_in_native || state == _thread_in_vm || state == _thread_blocked).
 275 //
 276 // Note that find_initial_Java_frame() can return false even if an initial
 277 // Java method was found (e.g., there is no PCDesc available for the method).
 278 //
 279 // If 'method_p' is NULL, it was not possible to find a Java frame when
 280 // walking the stack starting from 'fr'. In this case find_initial_Java_frame
 281 // returns false.
 282 
 283 static bool find_initial_Java_frame(JavaThread* thread,
 284                                     frame* fr,
 285                                     frame* initial_frame_p,
 286                                     Method** method_p,
 287                                     int* bci_p) {
 288 
 289   // It is possible that for a frame containing an nmethod
 290   // we can capture the method but no bci. If we get no
 291   // bci the frame isn't walkable but the method is usable.
 292   // Therefore we init the returned Method* to NULL so the
 293   // caller can make the distinction.
 294 
 295   *method_p = NULL;
 296 
 297   // On the initial call to this method the frame we get may not be
 298   // recognizable to us. This should only happen if we are in a JRT_LEAF
 299   // or something called by a JRT_LEAF method.
 300 
 301   frame candidate = *fr;
 302 
 303   // If the starting frame we were given has no codeBlob associated with
 304   // it see if we can find such a frame because only frames with codeBlobs
 305   // are possible Java frames.
 306 
 307   if (fr->cb() == NULL) {
 308 
 309     // See if we can find a useful frame
 310     int loop_count;
 311     int loop_max = MaxJavaStackTraceDepth * 2;
 312     RegisterMap map(thread, false);
 313 
 314     for (loop_count = 0; loop_count < loop_max; loop_count++) {
 315       if (!candidate.safe_for_sender(thread)) return false;
 316       candidate = candidate.sender(&map);
 317       if (candidate.cb() != NULL) break;
 318     }
 319     if (candidate.cb() == NULL) return false;
 320   }
 321 
 322   // We have a frame known to be in the codeCache
 323   // We will hopefully be able to figure out something to do with it.
 324   int loop_count;
 325   int loop_max = MaxJavaStackTraceDepth * 2;
 326   RegisterMap map(thread, false);
 327 
 328   for (loop_count = 0; loop_count < loop_max; loop_count++) {
 329 
 330     if (candidate.is_entry_frame()) {
 331       // jcw is NULL if the java call wrapper couldn't be found
 332       JavaCallWrapper *jcw = candidate.entry_frame_call_wrapper_if_safe(thread);
 333       // If initial frame is frame from StubGenerator and there is no
 334       // previous anchor, there are no java frames associated with a method
 335       if (jcw == NULL || jcw->is_first_frame()) {
 336         return false;
 337       }
 338     }
 339 
 340     if (candidate.is_interpreted_frame()) {
 341       if (is_decipherable_interpreted_frame(thread, &candidate, method_p, bci_p)) {
 342         *initial_frame_p = candidate;
 343         return true;
 344       }
 345 
 346       // Hopefully we got some data
 347       return false;
 348     }
 349 
 350     if (candidate.cb()->is_nmethod()) {
 351 
 352       nmethod* nm = (nmethod*) candidate.cb();
 353       *method_p = nm->method();
 354 
 355       // If the frame is not decipherable, then the value of -1
 356       // for the BCI is used to signal that no BCI is available.
 357       // Furthermore, the method returns false in this case.
 358       //
 359       // If a decipherable frame is available, the BCI value will
 360       // not be used.
 361 
 362       *bci_p = -1;
 363 
 364       *initial_frame_p = candidate;
 365 
 366       // Native wrapper code is trivial to decode by vframeStream
 367 
 368       if (nm->is_native_method()) return true;
 369 
 370       // If the frame is not decipherable, then a PC was found
 371       // that does not have a PCDesc from which a BCI can be obtained.
 372       // Nevertheless, a Method was found.
 373 
 374       if (!is_decipherable_compiled_frame(thread, &candidate, nm)) {
 375         return false;
 376       }
 377 
 378       // is_decipherable_compiled_frame may modify candidate's pc
 379       *initial_frame_p = candidate;
 380 
 381       assert(nm->pc_desc_at(candidate.pc()) != NULL, "debug information must be available if the frame is decipherable");
 382 
 383       return true;
 384     }
 385 
 386     // Must be some stub frame that we don't care about
 387 
 388     if (!candidate.safe_for_sender(thread)) return false;
 389     candidate = candidate.sender(&map);
 390 
 391     // If it isn't in the code cache something is wrong
 392     // since once we find a frame in the code cache they
 393     // all should be there.
 394 
 395     if (candidate.cb() == NULL) return false;
 396 
 397   }
 398 
 399   return false;
 400 
 401 }
 402 
 403 static void forte_fill_call_trace_given_top(JavaThread* thd,
 404                                             ASGCT_CallTrace* trace,
 405                                             int depth,
 406                                             frame top_frame) {
 407   NoHandleMark nhm;
 408 
 409   frame initial_Java_frame;
 410   Method* method;
 411   int bci = -1; // assume BCI is not available for method
 412                 // update with correct information if available
 413   int count;
 414 
 415   count = 0;
 416   assert(trace->frames != NULL, "trace->frames must be non-NULL");
 417 
 418   // Walk the stack starting from 'top_frame' and search for an initial Java frame.
 419   find_initial_Java_frame(thd, &top_frame, &initial_Java_frame, &method, &bci);
 420 
 421   // Check if a Java Method has been found.
 422   if (method == NULL) return;
 423 
 424   if (!method->is_valid_method()) {
 425     trace->num_frames = ticks_GC_active; // -2
 426     return;
 427   }
 428 
 429   vframeStreamForte st(thd, initial_Java_frame, false);
 430 
 431   for (; !st.at_end() && count < depth; st.forte_next(), count++) {
 432     bci = st.bci();
 433     method = st.method();
 434 
 435     if (!method->is_valid_method()) {
 436       // we throw away everything we've gathered in this sample since
 437       // none of it is safe
 438       trace->num_frames = ticks_GC_active; // -2
 439       return;
 440     }
 441 
 442     trace->frames[count].method_id = method->find_jmethod_id_or_null();
 443     if (!method->is_native()) {
 444       trace->frames[count].lineno = bci;
 445     } else {
 446       trace->frames[count].lineno = -3;
 447     }
 448   }
 449   trace->num_frames = count;
 450   return;
 451 }
 452 
 453 
 454 // Forte Analyzer AsyncGetCallTrace() entry point. Currently supported
 455 // on Linux X86, Solaris SPARC and Solaris X86.
 456 //
 457 // Async-safe version of GetCallTrace being called from a signal handler
 458 // when a LWP gets interrupted by SIGPROF but the stack traces are filled
 459 // with different content (see below).
 460 //
 461 // This function must only be called when JVM/TI
 462 // CLASS_LOAD events have been enabled since agent startup. The enabled
 463 // event will cause the jmethodIDs to be allocated at class load time.
 464 // The jmethodIDs cannot be allocated in a signal handler because locks
 465 // cannot be grabbed in a signal handler safely.
 466 //
 467 // void (*AsyncGetCallTrace)(ASGCT_CallTrace *trace, jint depth, void* ucontext)
 468 //
 469 // Called by the profiler to obtain the current method call stack trace for
 470 // a given thread. The thread is identified by the env_id field in the
 471 // ASGCT_CallTrace structure. The profiler agent should allocate a ASGCT_CallTrace
 472 // structure with enough memory for the requested stack depth. The VM fills in
 473 // the frames buffer and the num_frames field.
 474 //
 475 // Arguments:
 476 //
 477 //   trace    - trace data structure to be filled by the VM.
 478 //   depth    - depth of the call stack trace.
 479 //   ucontext - ucontext_t of the LWP
 480 //
 481 // ASGCT_CallTrace:
 482 //   typedef struct {
 483 //       JNIEnv *env_id;
 484 //       jint num_frames;
 485 //       ASGCT_CallFrame *frames;
 486 //   } ASGCT_CallTrace;
 487 //
 488 // Fields:
 489 //   env_id     - ID of thread which executed this trace.
 490 //   num_frames - number of frames in the trace.
 491 //                (< 0 indicates the frame is not walkable).
 492 //   frames     - the ASGCT_CallFrames that make up this trace. Callee followed by callers.
 493 //
 494 //  ASGCT_CallFrame:
 495 //    typedef struct {
 496 //        jint lineno;
 497 //        jmethodID method_id;
 498 //    } ASGCT_CallFrame;
 499 //
 500 //  Fields:
 501 //    1) For Java frame (interpreted and compiled),
 502 //       lineno    - bci of the method being executed or -1 if bci is not available
 503 //       method_id - jmethodID of the method being executed
 504 //    2) For native method
 505 //       lineno    - (-3)
 506 //       method_id - jmethodID of the method being executed
 507 
 508 extern "C" {
 509 JNIEXPORT
 510 void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
 511   JavaThread* thread;
 512 
 513   if (trace->env_id == NULL ||
 514     (thread = JavaThread::thread_from_jni_environment(trace->env_id)) == NULL ||
 515     thread->is_exiting()) {
 516 
 517     // bad env_id, thread has exited or thread is exiting
 518     trace->num_frames = ticks_thread_exit; // -8
 519     return;
 520   }
 521 
 522   if (thread->in_deopt_handler()) {
 523     // thread is in the deoptimization handler so return no frames
 524     trace->num_frames = ticks_deopt; // -9
 525     return;
 526   }
 527 
 528   assert(JavaThread::current() == thread,
 529          "AsyncGetCallTrace must be called by the current interrupted thread");
 530 
 531   if (!JvmtiExport::should_post_class_load()) {
 532     trace->num_frames = ticks_no_class_load; // -1
 533     return;
 534   }
 535 
 536   if (Universe::heap()->is_gc_active()) {
 537     trace->num_frames = ticks_GC_active; // -2
 538     return;
 539   }
 540 
 541   switch (thread->thread_state()) {
 542   case _thread_new:
 543   case _thread_uninitialized:
 544   case _thread_new_trans:
 545     // We found the thread on the threads list above, but it is too
 546     // young to be useful so return that there are no Java frames.
 547     trace->num_frames = 0;
 548     break;
 549   case _thread_in_native:
 550   case _thread_in_native_trans:
 551   case _thread_blocked:
 552   case _thread_blocked_trans:
 553   case _thread_in_vm:
 554   case _thread_in_vm_trans:
 555     {
 556       frame fr;
 557 
 558       // param isInJava == false - indicate we aren't in Java code
 559       if (!thread->pd_get_top_frame_for_signal_handler(&fr, ucontext, false)) {
 560         trace->num_frames = ticks_unknown_not_Java;  // -3 unknown frame
 561       } else {
 562         if (!thread->has_last_Java_frame()) {
 563           trace->num_frames = 0; // No Java frames
 564         } else {
 565           trace->num_frames = ticks_not_walkable_not_Java;    // -4 non walkable frame by default
 566           forte_fill_call_trace_given_top(thread, trace, depth, fr);
 567 
 568           // This assert would seem to be valid but it is not.
 569           // It would be valid if we weren't possibly racing a gc
 570           // thread. A gc thread can make a valid interpreted frame
 571           // look invalid. It's a small window but it does happen.
 572           // The assert is left here commented out as a reminder.
 573           // assert(trace->num_frames != ticks_not_walkable_not_Java, "should always be walkable");
 574 
 575         }
 576       }
 577     }
 578     break;
 579   case _thread_in_Java:
 580   case _thread_in_Java_trans:
 581     {
 582       frame fr;
 583 
 584       // param isInJava == true - indicate we are in Java code
 585       if (!thread->pd_get_top_frame_for_signal_handler(&fr, ucontext, true)) {
 586         trace->num_frames = ticks_unknown_Java;  // -5 unknown frame
 587       } else {
 588         trace->num_frames = ticks_not_walkable_Java;  // -6, non walkable frame by default
 589         forte_fill_call_trace_given_top(thread, trace, depth, fr);
 590       }
 591     }
 592     break;
 593   default:
 594     // Unknown thread state
 595     trace->num_frames = ticks_unknown_state; // -7
 596     break;
 597   }
 598 }
 599 
 600 
 601 #ifndef _WINDOWS
 602 // Support for the Forte(TM) Peformance Tools collector.
 603 //
 604 // The method prototype is derived from libcollector.h. For more
 605 // information, please see the libcollect man page.
 606 
 607 // Method to let libcollector know about a dynamically loaded function.
 608 // Because it is weakly bound, the calls become NOP's when the library
 609 // isn't present.
 610 #ifdef __APPLE__
 611 // XXXDARWIN: Link errors occur even when __attribute__((weak_import))
 612 // is added
 613 #define collector_func_load(x0,x1,x2,x3,x4,x5,x6) ((void) 0)
 614 #else
 615 void    collector_func_load(char* name,
 616                             void* null_argument_1,
 617                             void* null_argument_2,
 618                             void *vaddr,
 619                             int size,
 620                             int zero_argument,
 621                             void* null_argument_3);
 622 #pragma weak collector_func_load
 623 #define collector_func_load(x0,x1,x2,x3,x4,x5,x6) \
 624         ( collector_func_load ? collector_func_load(x0,x1,x2,x3,x4,x5,x6),(void)0 : (void)0 )
 625 #endif // __APPLE__
 626 #endif // !_WINDOWS
 627 
 628 } // end extern "C"
 629 #endif // !IA64 && !PPC64
 630 
 631 void Forte::register_stub(const char* name, address start, address end) {
 632 #if !defined(_WINDOWS) && !defined(IA64) && !defined(PPC64)
 633   assert(pointer_delta(end, start, sizeof(jbyte)) < INT_MAX,
 634          "Code size exceeds maximum range");
 635 
 636   collector_func_load((char*)name, NULL, NULL, start,
 637     pointer_delta(end, start, sizeof(jbyte)), 0, NULL);
 638 #endif // !_WINDOWS && !IA64 && !PPC64
 639 }
 640 
 641 #else // INCLUDE_JVMTI
 642 extern "C" {
 643   JNIEXPORT
 644   void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
 645     trace->num_frames = ticks_no_class_load; // -1
 646   }
 647 }
 648 #endif // INCLUDE_JVMTI