随笔分类 -  glibc

摘要:【glibc2.17】 核心代码在1542-1566行 每个循环逻辑 1)源地址到寄存器,寄存器到目的地址 2)每次拷贝8次*2字节=16字节 【主要逻辑】 阅读全文
posted @ 2024-02-12 17:02 stupidstan2019 阅读(243) 评论(1) 推荐(0)
摘要:【环境】 在ubuntu上没调好 centos上 debuginfo-install glibc-devel.x86_64 【源码分析参考】 https://blog.csdn.net/u011039332/article/details/127945984 【3k多行代码】 阅读全文
posted @ 2024-02-11 11:23 stupidstan2019 阅读(37) 评论(0) 推荐(0)
摘要:【问题描述】 pthread_cond_signal正常2us级别,但是有10ms级别的抖动 【先说结论】 消费者3因为等cpu调度10ms,导致生产者1也等了10ms,表现为pthread_cond_signal执行了10ms 【参考源码】 https://blog.csdn.net/qq_314 阅读全文
posted @ 2023-11-12 15:58 stupidstan2019 阅读(106) 评论(1) 推荐(0)
摘要:【调用栈】 【代码】 【glibc2.17和2.18性能的讨论】 https://sourceware.org/bugzilla/show_bug.cgi?id=24872 阅读全文
posted @ 2023-06-18 20:01 stupidstan2019 阅读(185) 评论(1) 推荐(0)
摘要:【环境】 1)机器:ubuntu2004-glibc 2)libc位置 ll /lib/x86_64-linux-gnu/libc.so.6 lrwxrwxrwx 1 root root 12 Apr 7 2022 /lib/x86_64-linux-gnu/libc.so.6 -> libc-2. 阅读全文
posted @ 2023-06-04 21:42 stupidstan2019 阅读(30) 评论(0) 推荐(0)
摘要:【问题描述】 平均调用要3us 【内部耗时】 主要是futex_wait系统调用 【ftrace】 参考https://blog.csdn.net/weixin_44410537/article/details/103587609 sudo trace-cmd record -p function_ 阅读全文
posted @ 2023-06-04 21:17 stupidstan2019 阅读(103) 评论(2) 推荐(0)
摘要:【问题描述】 10个生产者malloc(50KB),1个消费者(模拟业务,1ms后free) 调用malloc接口大概13us,分析耗时 【调用栈】 【编译调试】 root@jch:~/glibc_test/glibc-2.31/build# make install -sj;gcc -g -L / 阅读全文
posted @ 2023-06-04 18:53 stupidstan2019 阅读(244) 评论(0) 推荐(0)
摘要:1)段错误分析 https://blog.csdn.net/thesre/article/details/120070792 2)把共享库(SO)加载到指定的内存地址 https://www.cnblogs.com/zhangyunlin/archive/2006/07/01/6167867.htm 阅读全文
posted @ 2022-08-28 13:20 stupidstan2019 阅读(78) 评论(1) 推荐(0)
摘要: 阅读全文
posted @ 2022-07-15 07:45 stupidstan2019 阅读(13) 评论(0) 推荐(0)