system/exec 函数: 这两个函数会利用/bin/sh 指定的shell来执行指定的命令,所以,指定的 …
分类存档:程序设计
golang IDE之 gogland
https://www.jetbrains.com/go/ 优点: 可以debug
golang 可以用于windows编程吗
golang 可以用于windows编程吗? 理论上可以,但是又有哪个IDE去支持golang进行window …
关于C语言之字符串拼接(堆与栈)
且看一个demo:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
int do_sth(int type) { char *errstr; switch(type) { case 1: errstr = "Error";break case 2: errstr = "Warn";break case 3: errstr = "Info";break case 4: errstr = "Debug";break default: return 0; } if (...) {..} if (...) { ..; fprintf(stdout, "%s %s", errstr, ...); return 1; } if (...) { return 1;} if (...) { fprintf(stderr, "%s %s", errstr, ...); } ... return 0; } |
问题: 如何在errst …
关于php-fpm reload的优雅实现
我们知道,nginx的reload是不会影响服务的,php-fpm也有reload 功能,而且确实不是rest …
关于PHP中的长连接
长连接(也叫持久连接)是啥? 对于PHP来讲,如果是运行在web模式,每次请求完成,php会回收所有需要的申请 …
PHP5 升级到PHP7时curl注意事项
(从大量的CLOSE_WAIT发现的问题) 脚本: [crayon-675ac20e8b7c52 …
当tinyproxy遇上php的soap
用例: 使用tinyproxy-1.8.3做代理 php访问soap服务时,使用tinyproxy做代理访问h …
java cpu 100% 无响应
占用cpu高的线程的堆栈如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
Thread 1 (process 17775): #0 0x00007fa870981179 in Klass::subklass() const () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #1 0x00007fa8706d15c5 in Dependencies::find_finalizable_subclass(Klass*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #2 0x00007fa8705df8ee in ciInstanceKlass::has_finalizable_subclass() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #3 0x00007fa87052483e in GraphBuilder::call_register_finalizer() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #4 0x00007fa87052b2a5 in GraphBuilder::method_return(Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #5 0x00007fa87053185f in GraphBuilder::iterate_bytecodes_for_block(int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #6 0x00007fa87052ec4b in GraphBuilder::iterate_all_blocks(bool) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #7 0x00007fa87052f5e6 in GraphBuilder::try_inline_full(ciMethod*, bool, Bytecodes::Code, Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #8 0x00007fa87052f7df in GraphBuilder::try_inline(ciMethod*, bool, Bytecodes::Code, Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #9 0x00007fa870530912 in GraphBuilder::invoke(Bytecodes::Code) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #10 0x00007fa87053183d in GraphBuilder::iterate_bytecodes_for_block(int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #11 0x00007fa87052ec4b in GraphBuilder::iterate_all_blocks(bool) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #12 0x00007fa87052f5e6 in GraphBuilder::try_inline_full(ciMethod*, bool, Bytecodes::Code, Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #13 0x00007fa87052f7df in GraphBuilder::try_inline(ciMethod*, bool, Bytecodes::Code, Instruction*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #14 0x00007fa870530912 in GraphBuilder::invoke(Bytecodes::Code) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #15 0x00007fa87053183d in GraphBuilder::iterate_bytecodes_for_block(int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #16 0x00007fa87052ebf2 in GraphBuilder::iterate_all_blocks(bool) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #17 0x00007fa8705337a7 in GraphBuilder::GraphBuilder(Compilation*, IRScope*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #18 0x00007fa87053c127 in IRScope::IRScope(Compilation*, IRScope*, int, ciMethod*, int, bool) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #19 0x00007fa87053c23f in IR::IR(Compilation*, ciMethod*, int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #20 0x00007fa87051b25b in Compilation::build_hir() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #21 0x00007fa87051b61e in Compilation::compile_java_method() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #22 0x00007fa87051b74e in Compilation::compile_method() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #23 0x00007fa87051babe in Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #24 0x00007fa87051c869 in Compiler::compile_method(ciEnv*, ciMethod*, int) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #25 0x00007fa87066f43a in CompileBroker::invoke_compiler_on_method(CompileTask*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #26 0x00007fa8706703e6 in CompileBroker::compiler_thread_loop() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #27 0x00007fa870c2386f in JavaThread::thread_main_inner() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #28 0x00007fa870c2399c in JavaThread::run() () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #29 0x00007fa870ad7de8 in java_start(Thread*) () from /usr/java/jdk1.8.0_45/jre/lib/amd64/server/libjvm.so #30 0x0000003202c079d1 in start_thread () from /lib64/libpthread.so.0 #31 0x00000032028e88fd in clone () from /lib64/libc.so.6 |
gdb 跟进 …
JVM监控与调优
http://www.cnblogs.com/zhguang/p/Java-JVM-GC.htm …