乐于分享
好东西不私藏

Java源码探秘:JVM启动与类加载机制

Java源码探秘:JVM启动与类加载机制

JVM初始化简介

    • 前言
    • JVM初始化简介
      • 1\. 初始化 JVM (InitializeJVM)
      • 2\. 加载主类 (Load Main Class)
      • 3\. 寻找并验证 main 方法
      • 4\. 调用 main 方法
      • 5\. JavaMain函数核心代码
    • 启动引导类加载器 (Bootstrap ClassLoader)源码分析
      • `LoadMainClass()`函数源码分析
    • 补充说明
      • JVM_FindClassFromBootLoader源码分析
      • java启动过程主要源码

前言

本文旨在记录近期研读Java源码的学习心得与疑难问题。由于个人理解水平有限,文中内容可能存在疏漏,恳请读者不吝指正。

JVM初始化简介

在JVM启动过程时,会在JVMInit()函数中进行JVM初始化,并创建创建一个新的线程来执行java应用的启动过程,就是continuation所指向的JavaMain()函数里面的逻辑。java.c中的JavaMain()函数的核心四个步骤如下:

1. 初始化 JVM (InitializeJVM)

这是最重头戏的部分。它会调用 JNI_CreateJavaVM,这个调用会:

  • 分配堆内存:根据你设置的 -Xms 和 -Xmx 划分内存。

  • 启动引导类加载器 (Bootstrap ClassLoader):加载 rt.jar 或 Java 9 之后的模块化核心类。

  • 启动关键系统线程:如垃圾回收线程 (GC threads)、信号转发线程 (Signal Dispatcher) 和编译线程 (JIT Compiler)。

2. 加载主类 (Load Main Class)

JVM 启动后,它需要知道从哪里开始运行。

  • 如果你运行的是 java MyClass,它会寻找 MyClass.class

  • 如果你运行的是 java -jar app.jar,它会读取 MANIFEST.MF 文件中的 Main-Class 属性。

3. 寻找并验证 main 方法

JVM 会在主类中寻找符合特定签名的入口: public static void main(String[] args) 如果找不到,或者签名不对(比如不是 static 的),程序就会在这里抛出经典的 Main method not found 错误并退出。

4. 调用 main 方法

最后,通过 JNI 调用 CallStaticVoidMethod。 至此,控制权正式从 C 语言的启动器移交给你的 Java 代码。

5. JavaMain函数核心代码

jdk\src\share\bin\java.c中 JavaMain()核心代码如下:

int JNICALL JavaMain(void * _args){    JavaMainArgs *args = (JavaMainArgs *)_args;    int argc = args->argc;    char **argv = args->argv;    int mode = args->mode;    char *what = args->what;    InvocationFunctions ifn = args->ifn;    JavaVM *vm = 0;    JNIEnv *env = 0;    jclass mainClass = NULL;    // 省略部分代码    if (!InitializeJVM(&vm, &env, &ifn)) {        JLI_ReportErrorMessage(JVM_ERROR1);        exit(1);    }    // 省略部分代码    // 加载主类    mainClass = LoadMainClass(env, mode, what);    CHECK_EXCEPTION_NULL_LEAVE(mainClass);    // 省略部分代码    // 调用public static void main(String[] args)方法执行Java应用的逻辑    mainID = (*env)->GetStaticMethodID(env, mainClass, "main""([Ljava/lang/String;)V");    CHECK_EXCEPTION_NULL_LEAVE(mainID);    (*env)->CallStaticVoidMethod(env, mainClass, mainID, mainArgs);    ret = (*env)->ExceptionOccurred(env) == NULL ? 0 : 1;    LEAVE();}

启动引导类加载器 (Bootstrap ClassLoader)源码分析

LoadMainClass()函数源码分析

java.c中 LoadMainClass()函数核心代码如下:

static jclass LoadMainClass(JNIEnv *env, int mode, char *name){    jmethodID mid;    jstring str;    jobject result;    jlong start, end;    jclass cls = GetLauncherHelperClass(env);    // 省略部分代码    NULL_CHECK0(mid = (*env)->GetStaticMethodID(env, cls,                "checkAndLoadMain",                "(ZILjava/lang/String;)Ljava/lang/Class;"));    str = NewPlatformString(env, name);    CHECK_JNI_RETURN_0(        result = (*env)->CallStaticObjectMethod(            env, cls, mid, USE_STDERR, mode, str));    // 省略部分代码    return (jclass)result;}

1、在GetLauncherHelperClass()函数中,最终通过JNI执行函数JVM_FindClassFromBootLoader()函数中查找到Java类sun.launcher.LauncherHelper

java.c中 GetLauncherHelperClass()核心代码如下:

jclass GetLauncherHelperClass(JNIEnv *env){    if (helperClass == NULL) {        NULL_CHECK0(helperClass = FindBootStrapClass(env,                "sun/launcher/LauncherHelper"));    }    return helperClass;}

jdk\src\solaris\bin\java_md_common.c中 FindBootStrapClass()代码。通过JNI调用libjvm.so中的JVM_FindClassFromBootLoader()

jclass FindBootStrapClass(JNIEnv *env, constchar* classname){   if (findBootClass == NULL) {       findBootClass = (FindClassFromBootLoader_t *)dlsym(RTLD_DEFAULT,          "JVM_FindClassFromBootLoader");       if (findBootClass == NULL) {           JLI_ReportErrorMessage(DLL_ERROR4,               "JVM_FindClassFromBootLoader");           return NULL;       }   }   return findBootClass(env, classname);}

JVM_FindClassFromBootLoader源码参见补充说明部分章节JVM_FindClassFromBootLoader源码分析

2、在查找的Java类sun.launcher.LauncherHelper后,调用JNIEnv->CallStaticObjectMethod()函数,执行Java类LauncherHelpercheckAndLoadMain()方法。在该方法中调用java.lang.ClassLoader类中initSystemClassLoader()方法,创建ExtClassLoaderAppClassLoader对象并将AppClassLoader对象返回,后续使用AppClassLoader对象的loadClass()方法完成Java类的查找和加载。

jdk\src\share\classes\sun\launcher\LauncherHelper.java中方法 checkAndLoadMain()核心代码如下:

    private static final ClassLoader scloader = ClassLoader.getSystemClassLoader();    public static Class<?> checkAndLoadMain(boolean printToStderr,                                            int mode,                                            String what) {        initOutput(printToStderr);        // get the class name        String cn = null;        switch (mode) {            case LM_CLASS:                cn = what;                break;            case LM_JAR:                cn = getMainClassFromJar(what);                break;            default:                // should never happen                throw new InternalError("" + mode + ": Unknown launch mode");        }        cn = cn.replace('/''.');        Class<?> mainClass = null;        try {            mainClass = scloader.loadClass(cn);        } catch (NoClassDefFoundError | ClassNotFoundException cnfe) {            // 省略部分代码        }        // 省略部分代码        return mainClass;    }

jdk\src\share\classes\java\lang\ClassLoader.java中方法 getSystemClassLoader() 该方法中会获取sun.misc.Launcher类中创建的ClassLoader(ExtClassLoaderAppClassLoader),其核心代码如下:

    publicstatic ClassLoader getSystemClassLoader() {        initSystemClassLoader();        if (scl == null) {            return null;        }        // 省略部分代码        return scl;    }    privatestatic synchronized voidinitSystemClassLoader() {        if (!sclSet) {            // 省略部分代码            sun.misc.Launcher l = sun.misc.Launcher.getLauncher();            if (l != null) {                scl = l.getClassLoader();            }            sclSet = true;        }    }

jdk\src\share\classes\sun\misc\Launcher.java,创建ExtClassLoaderAppClassLoader

public class Launcher {    // 省略部分代码    private static Launcher launcher = new Launcher();    publicstatic Launcher getLauncher() {        return launcher;    }    private ClassLoader loader;    publicLauncher() {        // Create the extension class loader        ClassLoader extcl;        try {            extcl = ExtClassLoader.getExtClassLoader();        } catch (IOException e) {            // 省略异常处理部分代码        }        // Now create the class loader to use to launch the application        try {            loader = AppClassLoader.getAppClassLoader(extcl);        } catch (IOException e) {            // 省略异常处理部分代码        }        // Also set the context class loader for the primordial thread.        Thread.currentThread().setContextClassLoader(loader);    }    public ClassLoader getClassLoader() {        return loader;    }}

补充说明

JVM_FindClassFromBootLoader源码分析

1、hotspot\src\share\vm\prims\jvm.cpp中 JVM_FindClassFromBootLoader()代码如下:

JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,                                              const char* name))  JVMWrapper2("JVM_FindClassFromBootLoader %s", name);  // Java libraries should ensure that name is never null...  if(name == NULL || (int)strlen(name) > Symbol::max_length()) {    // It's impossible to create this class;  the name cannot fit    // into the constant pool.    return NULL;  }  TempNewSymbol h_name = SymbolTable::new_symbol(name, CHECK_NULL);  Klass* k = SystemDictionary::resolve_or_null(h_name, CHECK_NULL);  if(k == NULL) {    return NULL;  }  if(TraceClassResolution) {    trace_class_resolution(k);  }  return(jclass) JNIHandles::make_local(env, k->java_mirror());JVM_END

2、宏展开后的代码如下:

extern "C" {  jclass JNICALL JVM_FindClassFromBootLoader(JNIEnv* env, constchar* name){    JavaThread* thread=JavaThread::thread_from_jni_environment(env);    ThreadInVMfromNative __tiv(thread);    debug_only(VMNativeEntryWrapper __vew;);    /* VM_ENTRY_BASE 展开内容 */    TRACE_CALL(jclass, JVM_FindClassFromBootLoader)    HandleMarkCleaner __hm(thread);    Thread* THREAD = thread;    os::verify_stack_alignment();    /* 原始函数体开始 */    JVMWrapper2("JVM_FindClassFromBootLoader %s", name);    if (name == NULL || (int)strlen(name) > Symbol::max_length()) {      return NULL;    }    TempNewSymbol h_name = SymbolTable::new_symbol(name, CHECK_NULL);    Klass* k = SystemDictionary::resolve_or_null(h_name, CHECK_NULL);    if (k == NULL) {      return NULL;    }    if (TraceClassResolution) {      trace_class_resolution(k);    }    return (jclass) JNIHandles::make_local(env, k->java_mirror());  }// extern "C" 闭合

3、hotspot\src\share\vm\runtime\thread.hpp中 **thread_from_jni_environment()**核心代码。通过JNIEnv获取其所属的JavaThread。

  static JavaThread* thread_from_jni_environment(JNIEnv* env){    JavaThread *thread_from_jni_env = (JavaThread*)((intptr_t)env - in_bytes(jni_environment_offset()));    // Only return NULL if thread is off the thread list; starting to    // exit should not return NULL.    if (thread_from_jni_env->is_terminated()) {       thread_from_jni_env->block_if_vm_exited();       return NULL;    } else {       return thread_from_jni_env;    }  }static ByteSize jni_environment_offset(){    return byte_offset_of(JavaThread, _jni_environment);}#define byte_offset_of(klass,field)   in_ByteSize((int)offset_of(klass, field))

4、hotspot\src\share\vm\utilities\globalDefinitions_gcc.hpp核心代码。获取klass中field的偏移量,方便后续通过klass的首地址+偏移量方式获取field的内存地址。

inline ByteSize in_ByteSize(int size)return size; }#define offset_of(klass,field) (size_t)((intx)&(((klass*)16)->field) - 16)

上述代码中 offset_of()作用:在编译时计算一个类(class)或结构体(struct)中某个成员变量(field)相对于对象起始地址的偏移量(Offset)。 代码((klass)16)->field)中使用16而不是0的原因如下:* 在标准的 C 语言 offsetof 宏中,通常使用 (klass*)0。但 OpenJDK 经常使用 16(或者其他非零值),原因如下:

  • 规避空指针检测(NULL Pointer Detection): 有些编译器或静态检查工具在看到 (klass*)0 并进行解引用(->field)时,会触发“对空指针解引用”的警告或错误,即使这只是在编译期计算地址。使用 16 可以巧妙地绕过这种检查。

  • 处理虚函数表(vtable)或特殊对齐: 在某些平台上,地址 0 是受保护的,或者地址 0 到 16 之间可能存在特殊的对齐限制。选择 16 这种稍微偏移一点的地址,通常是为了确保地址计算在语义上是“安全”的。

5、hotspot\src\share\vm\runtime\thread.hpp

classJavaThreadpublicThread{  friend classVMStructs; private:  JavaThread*    _next;                          // The next thread in the Threads list  oop            _threadObj;                     // The Java level thread object// 省略部分代码  JavaFrameAnchor _anchor;                       // Encapsulation of current java frame and it state  ThreadFunction _entry_point;  // _jni_environment变量定义  JNIEnv        _jni_environment;}

java启动过程主要源码

1、jdk\src\share\bin\java.h

#include"java.h"// 省略部分代码intJVMInit(InvocationFunctions* ifn, jlong threadStackSize,        int argc, char **argv,        int mode, char *what, int ret){    // 省略部分代码    // ContinueInNewThread是java.c中的方法    return ContinueInNewThread(ifn, threadStackSize, argc, argv, mode, what, ret);}

2、jdk\src\share\bin\java.h中ContinueInNewThread0()函数声明。

/* * Block current thread and continue execution in new thread */intContinueInNewThread0(int (JNICALL *continuation)(void *),                        jlong stack_size, void * args);

3、jdk\src\share\bin\java.c中方法 ContinueInNewThread()核心代码。JavaMain函数的地址,在ContinueInNewThread0()函数中作为参数传入pthread_create()函数,这样在创建一个新的线程后,当新线程被执行时就会JavaMain函数逻辑。

#include "java.h"// 省略部分代码intContinueInNewThread(InvocationFunctions* ifn, jlong threadStackSize,                    int argc, char **argv,                    int mode, char *what, int ret){    // 省略部分代码,仅仅保留核心代码    {      JavaMainArgs args;      int rslt;      args.argc = argc;      args.argv = argv;      args.mode = mode;      args.what = what;      args.ifn = *ifn;      // java.h中定义的方法ContinueInNewThread0(),该方法用于阻塞当前线程并创建新的线程执行java应用程序的启动过程      rslt = ContinueInNewThread0(JavaMain, threadStackSize, (void*)&args);      return (ret != 0) ? ret : rslt;    }}

4、jdk\src\solaris\bin\java_md_solinux.c中方法ContinueInNewThread0()核心代码。

intContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void * args) {    int rslt;    pthread_t tid;    pthread_attr_t attr;    pthread_attr_init(&attr);    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);    if (stack_size > 0) {      pthread_attr_setstacksize(&attr, stack_size);    }    if (pthread_create(&tid, &attr, (void *(*)(void*))continuation, (void*)args) == 0) {      void * tmp;      pthread_join(tid, &tmp);      rslt = (int)tmp;    }    // 省略部分代码    pthread_attr_destroy(&attr);    // 省略部分代码    return rslt;}
基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-05-14 13:11:10 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/624178.html
  2. 运行时间 : 0.113024s [ 吞吐率:8.85req/s ] 内存消耗:4,809.71kb 文件加载:145
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=29c61204b3522f881b0311a844d52524
  1. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_static.php ( 6.05 KB )
  7. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/ralouphie/getallheaders/src/getallheaders.php ( 1.60 KB )
  10. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  11. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  12. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  13. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  14. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  15. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  16. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  17. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  18. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  19. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions_include.php ( 0.16 KB )
  21. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions.php ( 5.54 KB )
  22. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  23. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  24. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  25. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/provider.php ( 0.19 KB )
  26. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  27. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  28. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  29. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/common.php ( 0.03 KB )
  30. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  32. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/alipay.php ( 3.59 KB )
  33. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  34. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/app.php ( 0.95 KB )
  35. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cache.php ( 0.78 KB )
  36. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/console.php ( 0.23 KB )
  37. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cookie.php ( 0.56 KB )
  38. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/database.php ( 2.48 KB )
  39. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/filesystem.php ( 0.61 KB )
  40. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/lang.php ( 0.91 KB )
  41. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/log.php ( 1.35 KB )
  42. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/middleware.php ( 0.19 KB )
  43. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/route.php ( 1.89 KB )
  44. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/session.php ( 0.57 KB )
  45. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/trace.php ( 0.34 KB )
  46. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/view.php ( 0.82 KB )
  47. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/event.php ( 0.25 KB )
  48. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  49. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/service.php ( 0.13 KB )
  50. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/AppService.php ( 0.26 KB )
  51. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  52. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  53. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  54. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  55. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  56. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/services.php ( 0.14 KB )
  57. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  58. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  59. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  60. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  61. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  62. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  63. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  64. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  65. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  66. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  67. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  68. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  69. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  70. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  71. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  72. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  73. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  74. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  75. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  76. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  77. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  78. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  79. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  80. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  81. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  82. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  83. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  84. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  85. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  86. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  87. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/Request.php ( 0.09 KB )
  88. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  89. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/middleware.php ( 0.25 KB )
  90. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  91. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  92. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  93. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  94. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  95. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  96. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  97. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  98. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  99. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  100. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  101. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  102. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  103. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/route/app.php ( 3.94 KB )
  104. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  105. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  106. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Index.php ( 9.87 KB )
  108. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/BaseController.php ( 2.05 KB )
  109. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  110. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  111. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  112. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  113. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  114. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  115. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  116. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  117. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  118. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  119. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  120. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  121. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  122. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  123. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  124. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  125. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  126. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  127. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  128. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  129. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  130. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  131. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  132. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  133. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  134. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  135. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Es.php ( 3.30 KB )
  136. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  137. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  138. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  139. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  140. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  141. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  142. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  143. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  144. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/runtime/temp/c935550e3e8a3a4c27dd94e439343fdf.php ( 31.50 KB )
  145. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000425s ] mysql:host=127.0.0.1;port=3306;dbname=wenku;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000564s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000272s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000368s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000473s ]
  6. SELECT * FROM `set` [ RunTime:0.000509s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000531s ]
  8. SELECT * FROM `article` WHERE `id` = 624178 LIMIT 1 [ RunTime:0.001135s ]
  9. UPDATE `article` SET `lasttime` = 1778735470 WHERE `id` = 624178 [ RunTime:0.012338s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.000301s ]
  11. SELECT * FROM `article` WHERE `id` < 624178 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000457s ]
  12. SELECT * FROM `article` WHERE `id` > 624178 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000354s ]
  13. SELECT * FROM `article` WHERE `id` < 624178 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000683s ]
  14. SELECT * FROM `article` WHERE `id` < 624178 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.000659s ]
  15. SELECT * FROM `article` WHERE `id` < 624178 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000701s ]
0.117259s