<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[langjian2012的专栏]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/langjian2012</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; langjian2012]]></copyright><item><title><![CDATA[memory泄露分析方法(FD泄漏篇)]]></title><link>https://blog.csdn.net/langjian2012/article/details/160315238</link><guid>https://blog.csdn.net/langjian2012/article/details/160315238</guid><author>langjian2012</author><pubDate>Sun, 19 Apr 2026 22:37:20 +0800</pubDate><description><![CDATA[从hprof文件中查看有无异常的surface，buffer等对象，最终找到原因。fd leak 导致SystemServer crash。]]></description><category></category></item><item><title><![CDATA[framework源代码技巧]]></title><link>https://blog.csdn.net/langjian2012/article/details/49515909</link><guid>https://blog.csdn.net/langjian2012/article/details/49515909</guid><author>langjian2012</author><pubDate>Sat, 27 Sep 2025 21:27:31 +0800</pubDate><description><![CDATA[使用
getGlobalVisibleRect(lineRect)]]></description><category></category></item><item><title><![CDATA[framework 编译技巧]]></title><link>https://blog.csdn.net/langjian2012/article/details/148150799</link><guid>https://blog.csdn.net/langjian2012/article/details/148150799</guid><author>langjian2012</author><pubDate>Thu, 22 May 2025 22:41:55 +0800</pubDate><description><![CDATA[android 根目录编译：make api-stubs-docs-non-updatable-update-current-api。会自动更新frameworks/base/api/current.txt或non-updatable-api/current.txt文件。mona项目在non-updatable-api更新api。其它项目更新成non-updatable-api更新api。android root目录，//framework推包。]]></description><category></category></item><item><title><![CDATA[preloaded-classes裁剪]]></title><link>https://blog.csdn.net/langjian2012/article/details/146123286</link><guid>https://blog.csdn.net/langjian2012/article/details/146123286</guid><author>langjian2012</author><pubDate>Sat, 08 Mar 2025 21:44:01 +0800</pubDate><description><![CDATA[frameworks\base\config\preloaded-classes 默认位置，如果改了不生效，可能有其它模块的mk文件指定了preloaded-classes覆盖了framework模块，例如。系统预加载了哪些class类？preloaded-classes预加载源代码：ZygoteInit.java。]]></description><category></category></item><item><title><![CDATA[系统时间学习笔记]]></title><link>https://blog.csdn.net/langjian2012/article/details/145357328</link><guid>https://blog.csdn.net/langjian2012/article/details/145357328</guid><author>langjian2012</author><pubDate>Sat, 25 Jan 2025 17:30:41 +0800</pubDate><description><![CDATA[Linux 硬件时间（RTC time）、系统时间（UTC时间、Universal time）、本地时间（Local time）、时区（Time zone）与夏令时（DST）解析-CSDN博客Unix时间戳(Unix timestamp)转换工具 - 站长工具]]></description><category></category></item><item><title><![CDATA[SurfaceFlinger Transaction机制原理]]></title><link>https://blog.csdn.net/langjian2012/article/details/145059990</link><guid>https://blog.csdn.net/langjian2012/article/details/145059990</guid><author>langjian2012</author><pubDate>Fri, 10 Jan 2025 15:55:04 +0800</pubDate><description><![CDATA[然后在surfaceflinger在handleMessageInvalidate()中处理完transaction后调用TransactionCallbackInvoker的sendCallbacks()去回调TransactionCompletedListener的onTransactionCompleted()函数，通知blastbufferqueue release掉buffer。例如把App的TransactionCompletedListener等属性传递给的SurfaceFlinger。]]></description><category></category></item><item><title><![CDATA[SurfaceFlinger EventThread原理]]></title><link>https://blog.csdn.net/langjian2012/article/details/145040722</link><guid>https://blog.csdn.net/langjian2012/article/details/145040722</guid><author>langjian2012</author><pubDate>Thu, 09 Jan 2025 19:27:10 +0800</pubDate><description><![CDATA[DispSyncSource::onVsyncCallback回调逻辑:从DisplayEventReceiver接收到vsync callback，EventThread::threadMain(监控到之后，传递给MessageQueue::vsyncCallback->invalidate。其中，threadMain(死循环，如果没有事件就wait，Vsync或其它函数push了事件，唤醒EventThread。（大致流程，详细待研究）]]></description><category></category></item><item><title><![CDATA[SurfaceFlinger MessageQueue原理]]></title><link>https://blog.csdn.net/langjian2012/article/details/145040284</link><guid>https://blog.csdn.net/langjian2012/article/details/145040284</guid><author>langjian2012</author><pubDate>Thu, 09 Jan 2025 19:11:42 +0800</pubDate><description><![CDATA[执行，调用公共方法SurfaceFlinger::schedule(mEventQueue->postMessage(std::move(task)));是SurfaceFlinger构造函数创建的1个消息队列（但不是android的。SurfaceFlinger目录下自定义的一个，但是内部也用了是android的。，用于SurfaceFlinger和HWC之间跨进程通讯。SurfaceFlinger是生产者，HWC是消费者。SurfaceFlinger生产message方式。例如：app有图像请求渲染。]]></description><category></category></item><item><title><![CDATA[ebpf 笔记]]></title><link>https://blog.csdn.net/langjian2012/article/details/144908244</link><guid>https://blog.csdn.net/langjian2012/article/details/144908244</guid><author>langjian2012</author><pubDate>Tue, 07 Jan 2025 20:12:30 +0800</pubDate><description><![CDATA[(extened Berkeley Packet Filter)是一种内核技术,它允许开发人员在不修改内核代码的情况下运行特定的功能。]]></description><category></category></item><item><title><![CDATA[App申请Surface流程（Android12 ）]]></title><link>https://blog.csdn.net/langjian2012/article/details/144972151</link><guid>https://blog.csdn.net/langjian2012/article/details/144972151</guid><author>langjian2012</author><pubDate>Mon, 06 Jan 2025 20:53:36 +0800</pubDate><description><![CDATA[从SurfaceFlinger申请surface]]></description><category></category></item><item><title><![CDATA[ANR（车机端anr分析）]]></title><link>https://blog.csdn.net/langjian2012/article/details/144435847</link><guid>https://blog.csdn.net/langjian2012/article/details/144435847</guid><author>langjian2012</author><pubDate>Sun, 05 Jan 2025 19:28:50 +0800</pubDate><description><![CDATA[主线程卡死：调同步binder卡死，主线程等锁启动4大组件：执行Activity：5s，ContentProvider：10s，BroadcastReceiver：（front 10s、background 60s），Service（前台20s、后台200s），例如：startForegroundService()()资源是否充足？cpu看（大：频发缺页中断，读取文件）kswapd0:0% user + 83%【avg  =1  avg60=4  avg300=2   表示IO频繁  】]]></description><category></category></item><item><title><![CDATA[App 创建window流程（android12 ）]]></title><link>https://blog.csdn.net/langjian2012/article/details/144933884</link><guid>https://blog.csdn.net/langjian2012/article/details/144933884</guid><author>langjian2012</author><pubDate>Sat, 04 Jan 2025 21:48:37 +0800</pubDate><description><![CDATA[从wms.createSurfaceLocked ~ SurfaceFlinger::createLayer如图所示。]]></description><category></category></item><item><title><![CDATA[Android Thread优先级和调度算法]]></title><link>https://blog.csdn.net/langjian2012/article/details/144437259</link><guid>https://blog.csdn.net/langjian2012/article/details/144437259</guid><author>langjian2012</author><pubDate>Sun, 29 Dec 2024 22:25:47 +0800</pubDate><description><![CDATA[Android中cpuset包含5个cgroups：foreground，background，system-background，restricted，top-app。其中 RR+FIFO 是实时线程优先级，它们之间的区别是RR在相同优先级的线程之间会公平轮询，FIFO会独占CPU直到阻塞为止。：PR（NI+20）：将nice级别显示为映射到更大优先级队列，-20映射到0，+19映射到39。SCHED_RESET_ON_FORK，Process所有线程会被设置成。不加Process.加上Process.]]></description><category></category></item><item><title><![CDATA[init启动流程如下]]></title><link>https://blog.csdn.net/langjian2012/article/details/144458247</link><guid>https://blog.csdn.net/langjian2012/article/details/144458247</guid><author>langjian2012</author><pubDate>Sun, 29 Dec 2024 22:23:33 +0800</pubDate><description><![CDATA[FirstStageMain()
    |
    v
  SetupSelinux()
    |
    v
  SecondStageMain()
    |
    v
+----------------------+
|  SetupCgroups   |
|  SetKptrRestrict  |
| TestPerfEventSelinux |
|   early-init   +--&gt; m]]></description><category></category></item><item><title><![CDATA[JVMTI 笔记]]></title><link>https://blog.csdn.net/langjian2012/article/details/144794239</link><guid>https://blog.csdn.net/langjian2012/article/details/144794239</guid><author>langjian2012</author><pubDate>Sat, 28 Dec 2024 20:36:02 +0800</pubDate><description><![CDATA[JVMTI(JVM tool interface)是一套c/c++开发接口，用于对JVM进行性能分析、debug、内存管理、线程分析等各种黑科技操作创建一个native工程，复制一份jdk中的头文件到项目cpp根目录（在jdk/include安装目录下）自定义一个memory.cpp通过jvmtiEnv->SetEventCallbacks方法设定我们想要监听的事件到jvmtiEventCallbacks集合里。]]></description><category></category></item><item><title><![CDATA[memory泄露分析方法(Binder，Window，View篇)]]></title><link>https://blog.csdn.net/langjian2012/article/details/144778959</link><guid>https://blog.csdn.net/langjian2012/article/details/144778959</guid><author>langjian2012</author><pubDate>Fri, 27 Dec 2024 22:55:37 +0800</pubDate><description><![CDATA[找大量重复的view，点击查看text文案如果相同则找产品他们确认是否合理。代码或dumpsys window来监测是否有大量同名window。]]></description><category></category></item><item><title><![CDATA[epoll笔记]]></title><link>https://blog.csdn.net/langjian2012/article/details/144755221</link><guid>https://blog.csdn.net/langjian2012/article/details/144755221</guid><author>langjian2012</author><pubDate>Thu, 26 Dec 2024 23:43:27 +0800</pubDate><description><![CDATA[select/poll：（轮询驱动）服务端主动遍历监听的所有客户端，查看每个客户端的fd是否有变化的消息（通过pipe管道通讯方式）弊端：每次遍历全部fd消耗更多cpu，fdset 每次都需全部copy到内核态。looper（） UI线程走到nativePollOnce -〉epoll_wait(mWakeEventFd）挂起，epoll：（事件驱动）服务端通过管道通讯方式将有变化事件的客户端保存到1个队列。epoll是1个服务端监听n个客户端socket请求的多路复用技术。]]></description><category></category></item><item><title><![CDATA[memory泄露分析方法(FD（File Descriptor）篇）]]></title><link>https://blog.csdn.net/langjian2012/article/details/144751124</link><guid>https://blog.csdn.net/langjian2012/article/details/144751124</guid><author>langjian2012</author><pubDate>Thu, 26 Dec 2024 23:16:15 +0800</pubDate><description><![CDATA[进程打开File，Socket，Pipe后生成一个File Descriptor，它是打开这个系统资源的标识符。File Descriptor是Linux下概念，fd 是 int类型非负数！fd标识符和泄漏文件类型关系。]]></description><category></category></item><item><title><![CDATA[系统卡顿，还是App卡]]></title><link>https://blog.csdn.net/langjian2012/article/details/144743409</link><guid>https://blog.csdn.net/langjian2012/article/details/144743409</guid><author>langjian2012</author><pubDate>Thu, 26 Dec 2024 14:35:49 +0800</pubDate><description><![CDATA[所有App都卡，大概率是系统稳定性问题导致，出现1个app 特有卡顿，从app侧找原因。打开相册播放视频，如果视频卡，大概率是系统资源不足（cpu，memory，gpu）打开2个不同app列表滑动都卡顿，大概率是系统cpu不足导致卡顿。没现场，只有log就看cpu，memory，gpu有无异常占用。]]></description><category></category></item><item><title><![CDATA[memory泄露分析方法(dma篇)]]></title><link>https://blog.csdn.net/langjian2012/article/details/144731480</link><guid>https://blog.csdn.net/langjian2012/article/details/144731480</guid><author>langjian2012</author><pubDate>Thu, 26 Dec 2024 00:43:50 +0800</pubDate><description><![CDATA[分析方法：dma_buf/bufinfodma_buf/dmaprocha。]]></description><category></category></item></channel></rss>