当前位置:首页>Linux>Linux 内核技术实战课(基础篇):内核启动流程

Linux 内核技术实战课(基础篇):内核启动流程

  • 2026-02-21 01:47:49
Linux 内核技术实战课(基础篇):内核启动流程

2026 瑞芯微Linux驱动课程大促!

文章目录

  • 一、链接脚本 vmlinux.lds

  • 二、内核启动流程分析

    • 2.1、Linux 内核入口 stext

    • 2.2、__mmap_switched 函数

    • 2.3、 start_kernel 函数

    • 2.4、 rest_init 函数

    • 2.5、 init 进程

一、链接脚本 vmlinux.lds

要分析 Linux 启动流程,同样需要先编译一下Linux 源码,因为有很多文件是需要编译才会生成的。首先分析 Linux 内核的连接脚本文件 arch/arm/kernel/vmlinux.lds,通过链接脚本可以找到 Linux 内核的第一行程序是从哪里执行的。vmlinux.lds 中有如下代码:

492OUTPUT_ARCH(arm)493ENTRY(stext)494 jiffies = jiffies_64;495 SECTIONS496{497/*498 * XXX: The linker does not define how output sections are499 * assigned to input sections when there are multiple statements500 * matching the same input section name. There is no documented501 * order of matching.502 *503 * unwind exit sections must be discarded before the rest of the504 * unwind sections get included.505 */506/DISCARD/:{507*(.ARM.exidx.exit.text)508*(.ARM.extab.exit.text)509......645}

第 493 行的 ENTRY 指明了了 Linux 内核入口,入口为stextstext 定义在文件arch/arm/kernel/head.S 中 , 因此要分析Linux 内核的启动流程,就得先从文件arch/arm/kernel/head.S 的 stext 处开始分析。

二、内核启动流程分析

首先上大图:

2.1、Linux 内核入口 stext

stext 是 Linux 内核的入口地址,在文件 arch/arm/kernel/head.S 中有如下所示提示内容:

/** Kernel startup entry point.* ---------------------------** This is normally called from the decompressor code. The requirements* are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0,* r1 = machine nr, r2 = atags or dtb pointer......*/

根据代码中的注释,Linux 内核启动之前要求如下:、关闭 MMU、关闭 D-cacheI-Cache 无所谓。r0=0r1=machine nr(也就是机器 ID)。r2=atags 或者设备树(dtb)首地址。Linux 内核的入口点 stext 其实相当于内核的入口函数,stext 函数内容如下:

80ENTRY(stext)......91 @ ensure svc mode and all interrupts masked92 safe_svcmode_maskall r99394 mrc p15,0, r9, c0, c0 @ get processor id95 bl __lookup_processor_type @ r5=procinfo r9=cpuid96 movs r10, r5 @ invalid processor(r5=0)?97THUMB( it eq ) @ force fixup-able long branch encoding98 beq __error_p @ yes, error 'p'99......107108 #ifndef CONFIG_XIP_KERNEL......113 #else114 ldr r8,=PLAT_PHYS_OFFSET @ always constant in this case115 #endif116117/*118 * r1 = machine no, r2 = atags or dtb,119 * r8 = phys_offset, r9 = cpuid, r10 = procinfo120 */121 bl __vet_atags......128 bl __create_page_tables129130/*131 * The following calls CPU specific code in a position independent132 * manner. See arch/arm/mm/proc-*.S for details. r10 = base of133 * xxx_proc_info structure selected by __lookup_processor_type134 * above. On return, the CPU will be ready for the MMU to be135 * turned on, and r0 will hold the CPU control register value.136 */137 ldr r13,=__mmap_switched @ address to jump to after138 @ mmu has been enabled139 adr lr,BSYM(1f) @ return(PIC) address140 mov r8, r4 @ set TTBR1 to swapper_pg_dir141 ldr r12,[r10, #PROCINFO_INITFUNC]142 add r12, r12, r10143 ret r121441: b __enable_mmu145ENDPROC(stext)

第 92 行,调用函数 safe_svcmode_maskall 确保 CPU 处于 SVC 模式,并且关闭了所有的中断。safe_svcmode_maskall 定义在文件 arch/arm/include/asm/assembler.h 中。第 94 行,读处理器 IDID 值保存在 r9 寄存器中。第 95 行,调用函数__lookup_processor_type 检查当前系统是否支持此 CPU,如果支持的就获 取 procinfo 信息。 procinfo 是 proc_info_list 类型的结构体 , proc_info_list 在文件arch/arm/include/asm/procinfo.h 中的定义如下:

structproc_info_list{unsignedint cpu_val;unsignedint cpu_mask;unsignedlong __cpu_mm_mmu_flags;/* used by head.S */unsignedlong __cpu_io_mmu_flags;/* used by head.S */unsignedlong __cpu_flush;/* used by head.S */constchar*arch_name;constchar*elf_name;unsignedint elf_hwcap;constchar*cpu_name;structprocessor*proc;structcpu_tlb_fns*tlb;structcpu_user_fns*user;structcpu_cache_fns*cache;};

Linux 内核将每种处理器都抽象为一个 proc_info_list 结构体,每种处理器都对应一个procinfo。因此可以通过处理器 ID 来找到对应的 procinfo结构,__lookup_processor_type 函数找到对应处理器的 procinfo以后会将其保存到 r5 寄存器中。继续回到示例代码 中,第 121 行,调用函数__vet_atags 验证 atags 或设备树(dtb)的合法性。函数__vet_atags 定义在文件arch/arm/kernel/head-common.S 中。第 128 行,调用函数__create_page_tables 创建页表。第 137 行,将函数__mmap_switched 的地址保存到 r13 寄存器中。_mmap_switched 定义在文件 arch/arm/kernel/head-common.S__mmap_switched 最终会调用 start_kernel 函数。第 144 行 , 调 用 __enable_mmu 函数使能 MMU , __enable_mmu 定 义 在 文 件arch/arm/kernel/head.S 中。__enable_mmu 最终会通过调用__turn_mmu_on 来打开 MMU__turn_mmu_on 最后会执行r13里面保存的__mmap_switched 函数。


2.2、__mmap_switched 函数

__mmap_switched 函数定义在文件 arch/arm/kernel/head-common.S 中,函数代码如下:

81 __mmap_switched:82 adr r3, __mmap_switched_data8384 ldmia r3!,{r4, r5, r6, r7}85 cmp r4, r5 @ Copy data segment if needed861: cmpne r5, r687 ldrne fp,[r4], #488 strne fp,[r5], #489 bne 1b9091 mov fp, #0 @ Clear BSS(and zero fp)921: cmp r6, r793 strcc fp,[r6],#494 bcc 1b9596ARM( ldmia r3,{r4, r5, r6, r7, sp})97THUMB( ldmia r3,{r4, r5, r6, r7})98THUMB( ldr sp,[r3, #16])99 str r9,[r4] @ Save processor ID100 str r1,[r5] @ Save machine type101 str r2,[r6] @ Save atags pointer102 cmp r7, #0103 strne r0,[r7] @ Save control register values104 b start_kernel105ENDPROC(__mmap_switched)

第 104 行最终调用 start_kernel 来启动 Linux 内核,start_kernel 函数定义在文件 init/main.c中。


2.3、 start_kernel 函数

start_kernel 通过调用众多的子函数来完成Linux启动之前的一些初始化工作,由于start_kernel函数里面调用的子函数太多,而这些子函数又很复杂,因此我们简单的来看一下一些重要的子函数。精简并添加注释后的 start_kernel 函数内容如下:

asmlinkage __visible void __init start_kernel(void){char*command_line;char*after_dashes;lockdep_init();/* lockdep 是死锁检测模块,此函数会初始化  * 两个 hash 表。此函数要求尽可能早的执行!  */set_task_stack_end_magic(&init_task);/* 设置任务栈结束魔术数,*用于栈溢出检测*/smp_setup_processor_id();/* 跟 SMP 有关(多核处理器),设置处理器 ID。 * 有很多资料说 ARM 架构下此函数为空函数,那是因 * 为他们用的老版本 Linux,而那时候 ARM 还没有多 * 核处理器。*/debug_objects_early_init();/* 做一些和 debug 有关的初始化 */boot_init_stack_canary();/* 栈溢出检测初始化 */cgroup_init_early();/* cgroup 初始化,cgroup 用于控制 Linux 系统资源*/local_irq_disable();/* 关闭当前 CPU 中断 */ early_boot_irqs_disabled = true;/* * 中断关闭期间做一些重要的操作,然后打开中断 */boot_cpu_init();/* 跟 CPU 有关的初始化 */page_address_init();/* 页地址相关的初始化 */pr_notice("%s", linux_banner);/* 打印 Linux 版本号、编译时间等信息 */setup_arch(&command_line);/* 架构相关的初始化,此函数会解析传递进来的 * ATAGS 或者设备树(DTB)文件。会根据设备树里面 * 的 model 和 compatible 这两个属性值来查找 * Linux 是否支持这个单板。此函数也会获取设备树 * 中 chosen 节点下的 bootargs 属性值来得到命令 * 行参数,也就是 uboot 中的 bootargs 环境变量的* 值,获取到的命令行参数会保存到*command_line 中。 */mm_init_cpumask(&init_mm);/* 看名字,应该是和内存有关的初始化 */setup_command_line(command_line);/* 好像是存储命令行参数 */setup_nr_cpu_ids();/* 如果只是 SMP(多核 CPU)的话,此函数用于获取 * CPU 核心数量,CPU 数量保存在变量 * nr_cpu_ids 中。*/setup_per_cpu_areas();/* 在 SMP 系统中有用,设置每个 CPU 的 per-cpu 数据 */smp_prepare_boot_cpu();build_all_zonelists(NULL,NULL);/* 建立系统内存页区(zone)链表 */page_alloc_init();/* 处理用于热插拔 CPU 的页 *//* 打印命令行信息 */pr_notice("Kernel command line: %s\n", boot_command_line);parse_early_param();/* 解析命令行中的 console 参数 */ after_dashes =parse_args("Booting kernel", static_command_line, __start___param, __stop___param - __start___param,-1,-1,&unknown_bootoption);if(!IS_ERR_OR_NULL(after_dashes))parse_args("Setting init args", after_dashes,NULL,0,-1,-1, set_init_arg);jump_label_init();setup_log_buf(0);/* 设置 log 使用的缓冲区*/pidhash_init();/* 构建 PID 哈希表,Linux 中每个进程都有一个 ID, * 这个 ID 叫做 PID。通过构建哈希表可以快速搜索进程 * 信息结构体。 */vfs_caches_init_early();/* 预先初始化 vfs(虚拟文件系统)的目录项和* 索引节点缓存*/sort_main_extable();/* 定义内核异常列表 */trap_init();/* 完成对系统保留中断向量的初始化 */mm_init();/* 内存管理初始化 */sched_init();/* 初始化调度器,主要是初始化一些结构体 */preempt_disable();/* 关闭优先级抢占 */if(WARN(!irqs_disabled(),/* 检查中断是否关闭,如果没有的话就关闭中断 */"Interrupts were enabled *very* early, fixing it\n"))local_irq_disable();idr_init_cache();/* IDR 初始化,IDR 是 Linux 内核的整数管理机 * 制,也就是将一个整数 ID 与一个指针关联起来。 */rcu_init();/* 初始化 RCU,RCU 全称为 Read Copy Update(读-拷贝修改) */trace_init();/* 跟踪调试相关初始化 */context_tracking_init();radix_tree_init();/* 基数树相关数据结构初始化 */early_irq_init();/* 初始中断相关初始化,主要是注册 irq_desc 结构体变 * 量,因为 Linux 内核使用 irq_desc 来描述一个中断。 */init_IRQ();/* 中断初始化 */tick_init();/* tick 初始化 */rcu_init_nohz();init_timers();/* 初始化定时器 */hrtimers_init();/* 初始化高精度定时器 */softirq_init();/* 软中断初始化 */timekeeping_init();time_init();/* 初始化系统时间 */sched_clock_postinit();perf_event_init();profile_init();call_function_init();WARN(!irqs_disabled(),"Interrupts were enabled early\n"); early_boot_irqs_disabled = false;local_irq_enable();/* 使能中断 */kmem_cache_init_late();/* slab 初始化,slab 是 Linux 内存分配器 */console_init();/* 初始化控制台,之前 printk 打印的信息都存放 * 缓冲区中,并没有打印出来。只有调用此函数 * 初始化控制台以后才能在控制台上打印信息。 */if(panic_later)panic("Too many boot %s vars at `%s'", panic_later, panic_param);lockdep_info();/* 如果定义了宏 CONFIG_LOCKDEP,那么此函数打印一些信息。*/locking_selftest()/* 锁自测 */......page_ext_init();debug_objects_mem_init();kmemleak_init();/* kmemleak 初始化,kmemleak 用于检查内存泄漏 */setup_per_cpu_pageset();numa_policy_init();if(late_time_init)late_time_init();sched_clock_init();calibrate_delay();/* 测定 BogoMIPS 值,可以通过 BogoMIPS 来判断 CPU 的性能 * BogoMIPS 设置越大,说明 CPU 性能越好。 */pidmap_init();/* PID 位图初始化 */anon_vma_init();/* 生成 anon_vma slab 缓存 */acpi_early_init();......thread_info_cache_init();cred_init();/* 为对象的每个用于赋予资格(凭证) */fork_init();/* 初始化一些结构体以使用 fork 函数 */proc_caches_init();/* 给各种资源管理结构分配缓存 */buffer_init();/* 初始化缓冲缓存 */key_init();/* 初始化密钥 */security_init();/* 安全相关初始化 */dbg_late_init();vfs_caches_init(totalram_pages);/* 为 VFS 创建缓存 */signals_init();/* 初始化信号 */page_writeback_init();/* 页回写初始化 */proc_root_init();/* 注册并挂载 proc 文件系统 */nsfs_init();cpuset_init();/* 初始化 cpuset,cpuset 是将 CPU 和内存资源以逻辑性 * 和层次性集成的一种机制,是 cgroup 使用的子系统之一 */cgroup_init();/* 初始化 cgroup */taskstats_init_early();/* 进程状态初始化 */delayacct_init();check_bugs();/* 检查写缓冲一致性 */acpi_subsystem_init();sfi_init_late();if(efi_enabled(EFI_RUNTIME_SERVICES)){efi_late_init();efi_free_boot_services();}ftrace_init();rest_init();/* rest_init 函数 */}

start_kernel 里面调用了大量的函数,每一个函数都是一个庞大的知识点,如果想要学习Linux 内核,那么这些函数就需要去详细的研究。start_kernel 函数最后调用了 rest_init,接下来简单看一下 rest_init函数。


2.4、 rest_init 函数

rest_init 函数定义在文件 init/main.c 中,函数内容如下:

383static noinline void __init_refok rest_init(void)384{385int pid;386387rcu_scheduler_starting();388smpboot_thread_init();389/*390 * We need to spawn init first so that it obtains pid 1, however391 * the init task will end up wanting to create kthreads, which, 392 * if we schedule it before we create kthreadd, will OOPS.393 */394kernel_thread(kernel_init,NULL, CLONE_FS);395numa_default_policy();396 pid =kernel_thread(kthreadd,NULL, CLONE_FS | CLONE_FILES);397rcu_read_lock();398 kthreadd_task =find_task_by_pid_ns(pid,&init_pid_ns);399rcu_read_unlock();400complete(&kthreadd_done);401402/*403 * The boot idle thread must execute schedule()404 * at least once to get things moving:405 */406init_idle_bootup_task(current);407schedule_preempt_disabled();408/* Call into cpu_idle with preempt disabled */409cpu_startup_entry(CPUHP_ONLINE);410}
  • 第 387 行,调用函数 rcu_scheduler_startin,启动 RCU 锁调度器

  • 第 394 行,调用函数 kernel_thread 创建 kernel_init 进程,也就是大名鼎鼎的 init 内核进程。init 进程的 PID 为 1。init 进程一开始是内核进程(也就是运行在内核态),后面 init 进程会在根文件系统中查找名为“init”这个程序,这个“init”程序处于用户态,通过运行这个“init”程序,init 进程就会实现从内核态到用户态的转变。

  • 第 396 行,调用函数 kernel_thread 创建 kthreadd 内核进程,此内核进程的 PID 为 2。kthreadd进程负责所有内核进程的调度和管理。

  • 第 409 行,最后调用函数 cpu_startup_entry 来进入 idle 进程,cpu_startup_entry 会调用cpu_idle_loop,cpu_idle_loop 是个 while 循环,也就是 idle 进程代码。idle 进程的 PID 为 0,idle进程叫做空闲进程,如果学过 FreeRTOS 或者 UCOS 的话应该听说过空闲任务。idle 空闲进程就和空闲任务一样,当 CPU 没有事情做的时候就在 idle 空闲进程里面“瞎逛游”,反正就是给CPU 找点事做。当其他进程要工作的时候就会抢占 idle 进程,从而夺取 CPU 使用权。其实大家应该可以看到 idle 进程并没有使用 kernel_thread 或者 fork 函数来创建,因为它是有主进程演变而来的。

在 Linux 终端中输入“ps -A”就可以打印出当前系统中的所有进程,其中就能看到 init 进程和 kthreadd 进程

init 进程的 PID 为 1,kthreadd 进程的 PID 为 2。


2.5、 init 进程

kernel_init 函数就是 init 进程具体做的工作,定义在文件 init/main.c 中,函数内容如下

928staticint __ref kernel_init(void*unused)929{930int ret;931932kernel_init_freeable();/* init 进程的一些其他初始化工作 */933/* need to finish all async __init code before freeing the memory */934async_synchronize_full();/* 等待所有的异步调用执行完成 */935free_initmem();/* 释放 init 段内存 */936mark_rodata_ro();937 system_state = SYSTEM_RUNNING;/* 标记系统正在运行 */938numa_default_policy();939940flush_delayed_fput();941942if(ramdisk_execute_command){943 ret =run_init_process(ramdisk_execute_command);944if(!ret)945return0;946pr_err("Failed to execute %s (error %d)\n",947 ramdisk_execute_command, ret);948}949950/*951 * We try each of these until one succeeds.952 *953 * The Bourne shell can be used instead of init if we are954 * trying to recove

最新文章

随机文章

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