Beispiel #1
0
MTable::MethodInfo::MethodInfo(Method_Handle _mh, size_t _num) {
    num = _num;
    mh = _mh;
    Class_Handle ch = method_get_class(mh);
    className = class_get_name(ch);
    methodName = method_get_name(mh);
    signature = method_get_descriptor(mh);
    assert(!className.empty() && !methodName.empty() && !signature.empty());
}
Beispiel #2
0
static void logReadyProfile(const std::string& catName, const std::string& profilerName, EBMethodProfile* mp) {
    const char* methodName = method_get_name(mp->mh);
    Class_Handle ch = method_get_class(mp->mh);
    const char* className = class_get_name(ch);
    const char* signature = method_get_descriptor(mp->mh);

    std::ostringstream msg;
    msg <<"EM: profiler["<<profilerName.c_str()<<"] profile is ready [e:"
        << mp->entryCounter <<" b:"<<mp->backedgeCounter<<"] "
        <<className<<"::"<<methodName<<signature;
    INFO2(catName.c_str(), msg.str().c_str());
}
Beispiel #3
0
static jint skip_old_frames(VM_thread *thread)
{
    if (NULL == getLastStackFrame(thread))
        return 0;

    StackFrame* first_frame = (StackFrame*)(thread->firstFrame);

    if (first_frame)
    {
        Class *clss = method_get_class(first_frame->method);
        assert(clss);

        if (strcmp(method_get_name(first_frame->method), "runImpl") == 0 &&
            strcmp(class_get_name(clss), "java/lang/Thread") == 0)
        {
            return 1;
        }
    }

    return 0;
}