- 博客(14)
- 资源 (1)
- 收藏
- 关注
原创 配置 Android Studio (Ubuntu)
1. 安装 jdk:sudo add-apt-repository ppa:webupd8team/javasudo apt-get updatesudo apt-get install oracle-java8-installer2. 从https://developer.android.com/studio/index.html#linux-bundle下载最新的 andr
2017-12-26 02:35:14 706
转载 OProfile Tutorial
OProfile is a performance profiler for Linux. In this article, we’ll explore what it does, how to install and configure it, and how to put the data it assembles to use.You might wonder why you would
2017-12-24 04:03:46 376
原创 profiling tools
1. valgrind(callgrind)http://valgrind.org/2. gperftoolshttps://github.com/gperftools/gperftoolshttps://github.com/gperftools/gperftools/wiki3.perfhttps://perf.wiki.kernel.org/index.p
2017-12-24 03:19:08 608
转载 使用valgrind的callgrind工具进行多线程性能分析
valgrind是开源的性能分析利器。 根据它的文档,可以用它来检查内存泄漏等问题,还可以用来生成函数的调用图,就这两个功能就足够有吸引力了。本文主要是介绍如何使用valgrind的callgrind工具进行性能分析。分析过程使用callgrind工具生成性能分析数据命令格式如下:valgrind --tool=callgrind ./exproxy其中 ./exproxy
2017-12-24 02:56:44 981
原创 使用 gprof 监测程序性能 (1)
代码如下 5.c:#include #include #include void foo(int i){ printf("%d\n", i);}void *thread( void *arg){ ProfilerRegisterThread(); int i = 0; while(1) { foo(i++); if(i == 100000) { b
2017-12-24 00:50:12 533
原创 libinput使用 meson编译了。
方法如下https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html最好加上选项 Ddebug-gui=false
2017-12-20 02:11:08 2736
原创 使用 meson 编译代码
1.安装 mesongit clone https://github.com/mesonbuild/meson.git之后,可以直接用可执行文件 meson.py2.安装 njnja:git clone git://github.com/ninja-build/ninja.git && cd ninjagit checkout release然后,执行./configure.
2017-12-19 22:13:28 31354 1
原创 监测键盘输入
当然需要使用 select函数。#include #include #include #include #include #include #include #include int main(void){ int kbd_fd = open("/dev/input/event3", O_RDONLY); if(kbd_fd < 0) { printf("fai
2017-12-18 22:56:28 792
原创 代码中调用setenv更改环境变量的值。。
即使成功改过来了, /proc/pid/environ也不会更新,因为这里面的值是在程序启动的时候读的, setenv不会更新它的值。https://unix.stackexchange.com/questions/302970/why-doesnt-unsetenv-modify-proc-pid-environ
2017-12-16 00:21:31 4026
原创 设置线程的名字
以前介绍过其中的一种方法:http://blog.csdn.net/caspiansea/article/details/12073571现在介绍另外一种方法:使用pthread_setname_np #define _GNU_SOURCE #include #include #include #incl
2017-12-15 08:40:47 3312
转载 Vim 复制粘帖格式错乱问题的解决办法
有时候,复制文本(尤其是代码)到 Vim,会出现格式错乱的问题。看样子,应该是自动缩进惹得祸。本文不去深究原因,直接给出解决方法。 1. paste 模式运行如下命令,进入 paste 模式::set paste进入 paste 模式后,按 i 键进入插入模式,然后再粘帖,文本格式不会错乱了。但粘帖后还需要按 进入普通模式并执行如下命令结束 paste 模式::set n
2017-12-13 07:48:33 3211 1
转载 Vim registers: The basics and beyond
im’s registers are that kind of stuff that you don’t think you need until you learn about them. After that, they become essential in your workflow, and it’s hard to let them behind. Saying that, it’s
2017-12-13 07:46:05 376
转载 SSHelper: 在ubuntu 和安卓手机之间无线传输文件
1.在手机上安装 sshelper:https://play.google.com/store/apps/details?id=com.arachnoid.sshelper&hl=enhttps://arachnoid.com/android/SSHelper/2. 安装好之后,运行,sshelper会显示一个IP地址和端口号在终端执行sshfs ANDROID_I
2017-12-10 09:14:21 7892 3
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人