09 2021 档案

摘要:current() macro current在内核中通常以宏的形式存在,其实现方式依赖于具体的架构和内核版本,有些实现是从堆栈中获取当前运行任务的task_struct结构指针,有些则从寄存器中获取。 current的实现 拿 arm64架构 + linux-5.4版本 为背景举例, curren 阅读全文
posted @ 2021-09-30 17:55 aspirs 阅读(302) 评论(0) 推荐(0) 编辑
摘要:raw_spin_lock_irqsave() flow include/linux/spinlock.h #define raw_spin_lock_irqsave(lock, flags) \ do { \ typecheck(unsigned long, flags); \ flags = _ 阅读全文
posted @ 2021-09-30 14:48 aspirs 阅读(373) 评论(0) 推荐(0) 编辑
摘要:arm archtecture ARMv8 架构与指令集.学习笔记 https://www.cnblogs.com/lvdongjie/p/6644821.html arm registers https://developer.arm.com/documentation/ddi0500/e/deb 阅读全文
posted @ 2021-09-30 14:12 aspirs 阅读(193) 评论(0) 推荐(0) 编辑
摘要:android framework misc Intent发送与接收 系统(framework)发送Intent,可以发送Intent的API如下:sendBroadcastsendOrderedBroadcastsendBroadcastAsUser apk注册Intent接收,在系统(frame 阅读全文
posted @ 2021-09-28 14:55 aspirs 阅读(128) 评论(0) 推荐(0) 编辑
摘要:kernel slab misc console:/sys/kernel/slab # ls :0000008 bio-0 kioctx :0000016 bio-1 kmalloc-128 :0000024 bio-2 kmalloc-1k :0000032 bio-3 kmalloc-256 : 阅读全文
posted @ 2021-09-25 20:28 aspirs 阅读(119) 评论(0) 推荐(0) 编辑
摘要:ftrace code ftrace event kmem:rss_stat trace event definition include/trace/events/kmem.h TRACE_EVENT(rss_stat, TP_PROTO(struct mm_struct *mm, int mem 阅读全文
posted @ 2021-09-25 19:13 aspirs 阅读(290) 评论(0) 推荐(0) 编辑
摘要:android malloc_debug tool malloc_debug使用方法 130|console:/ # cat /data/local.prop libc.debug.malloc.options=backtrace=16 guard=8 fill_on_free=16 free_tr 阅读全文
posted @ 2021-09-24 17:30 aspirs 阅读(1483) 评论(0) 推荐(0) 编辑
摘要:linux kernel input event处理流程 input驱动会调用input_register_device()来注册device到input framework; input设备驱动接收到时间输入事件时(接收的方式一般是硬件interrupt),会call input_event()上 阅读全文
posted @ 2021-09-12 20:06 aspirs 阅读(1232) 评论(0) 推荐(0) 编辑
摘要:linux kernel boot sequence early_param回调执行时间 [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.116+ #7[ 0.000000] Hardware name: machine_name(D 阅读全文
posted @ 2021-09-11 14:04 aspirs 阅读(181) 评论(0) 推荐(0) 编辑
摘要:linux驱动入口函数module_init何时被调用 被上面的宏处理过后,变成__initcall_func6 __used加入到内核映像的".initcall"区。内核的加载的时候,会搜索".initcall"中的所有条目,并按优先级加载它们,普通驱动程序的优先级是6。其它模块优先级列出如下:值 阅读全文
posted @ 2021-09-10 15:11 aspirs 阅读(397) 评论(0) 推荐(0) 编辑
摘要:一个简单字符驱动kernel module以及对应测试程序example module Makefile ifneq ($(KERNELRELEASE),) MODULE_NAME = slub_debug_test_module $(MODULE_NAME)-objs := slub_debug_ 阅读全文
posted @ 2021-09-05 20:12 aspirs 阅读(89) 评论(0) 推荐(0) 编辑
摘要:一个简单的android测试程序的Android.bp example如下,在android根目录下make slub_debug_test.bin即可: cc_binary { srcs: ["slub_debug_test.c"], name: "slub_debug_test.bin", pr 阅读全文
posted @ 2021-09-05 18:51 aspirs 阅读(108) 评论(0) 推荐(0) 编辑
摘要:内联汇编inline assembly(ARM) 而 C 中嵌入汇编代码由 gcc 编译器实现的,实现也非常简单,使用由编译器提供的 asm 或者 __asm__ 关键字即可,这两者没有任何区别,然后将需要执行的汇编指令使用("")包含起来即可,对应的汇编指令就会被执行。 我们来看看下面的嵌入汇编代 阅读全文
posted @ 2021-09-05 18:09 aspirs 阅读(3344) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示