Skip to content

Instantly share code, notes, and snippets.

@base698 base698/HTTP.java
Last active Nov 9, 2016

Embed
What would you like to do?
Stack Trace
import java.net.URL;
import java.net.URLConnection;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.StringBuffer;
public class HTTP {
public static void get() throws Exception {
String urlString = "http://localhost:1234/";
for(int i = 0; i < 2000; i++) {
URL url = new URL(urlString);
URLConnection conn = url.openConnection();
InputStream is = conn.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
StringBuffer sb = new StringBuffer();
int s;
while ((s = isr.read()) != -1)
sb.append(s);
System.out.println(sb.toString());
}
}
public static void main(String []args) throws Exception {
Thread.sleep(5000);
new Thread(new Runnable() {
public void run() {
try{
get();
} catch(Exception e) {}
}
}).start();
}
}
Tracing off-CPU time (us) of PID 20080 by user + kernel stack for 4 secs.
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a3b0 pthread_cond_wait
00007f362f146cc0 CHeapObj<(MemoryType)1>::operator new(unsigned long, NativeCallStack const&)
725000796c626d65 [unknown]
- java (20094)
5
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa108d805 schedule_timeout
ffffffffa0f57662 sk_wait_data
ffffffffa0fc1f55 tcp_recvmsg
ffffffffa0ff179e inet_recvmsg
ffffffffa0f5266d sock_recvmsg
ffffffffa0f528aa SYSC_recvfrom
ffffffffa0f53bee sys_recvfrom
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045d8cf __recv
00007f362f5825ee Monitor::notify()
00007f362f5c02d9 os::PlatformEvent::unpark()
00007f362f5bca2b os::start_thread(Thread*)
00007f36191085bc Lsun/net/spi/DefaultProxySelector$3;::run
00007f36190004e7 call_stub
00007f362f366435 JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)
00007f360befc8c0 [unknown]
00007f36280df800 [unknown]
00007f3612b0a1d8 [unknown]
00007f362f1d9f70 Metadata::is_klass() const volatile
9090909090c3c9e5 [unknown]
- java (20105)
2001472
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a759 pthread_cond_timedwait@@GLIBC_2.3.2
00007f362f769580 VMThread::loop()
00007f362f769ad0 VMThread::run()
00007f362f5c7128 java_start(Thread*)
00007f363045470a start_thread
- java (20090)
3000259
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a759 pthread_cond_timedwait@@GLIBC_2.3.2
00007f362f58395e Monitor::IWait(Thread*, long)
00007f362f583f26 Monitor::wait(bool, long, bool)
00007f362f70a791 WatcherThread::sleep() const
00007f362f70ac2e WatcherThread::run()
00007f362f5c7128 java_start(Thread*)
00007f363045470a start_thread
- java (20099)
3906272
Tracing off-CPU time (us) of PID 20080 by user + kernel stack for 10 secs.
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a3b0 pthread_cond_wait
00007f362f769e4e VMThread::execute(VM_Operation*)
00007f363045a366 pthread_cond_wait
c86d8b4c00000000 [unknown]
- java (20789)
48
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a3b0 pthread_cond_wait
0000000000000001 [unknown]
- java (20105)
55
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa080326c exit_to_usermode_loop
ffffffffa0803abf prepare_exit_to_usermode
ffffffffa108f825 retint_user
00007f362ef057a0 [unknown]
00007f362f19c4ce CompressedWriteStream::CompressedWriteStream(int)
00007f362f5b601c OopMap::OopMap(OopMap::DeepCopyToken, OopMap*)
00007f362f5b62e4 OopMap::deep_copy()
00007f362f05eace CodeEmitInfo::record_debug_info(DebugInformationRecorder*, int)
00007f362f06ddb8 LIR_Assembler::add_call_info(int, CodeEmitInfo*)
00007f362f03acaf ImplicitNullCheckStub::emit_code(LIR_Assembler*)
00007f362f06e4e3 LIR_Assembler::emit_slow_case_stubs()
00007f362f03e31c Compilation::emit_code_epilog(LIR_Assembler*)
00007f362f03ef8b Compilation::emit_code_body()
00007f362f03f603 Compilation::compile_java_method()
00007f362f03f69e Compilation::compile_method()
00007f362f03fa0e Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*)
00007f362f0407b9 Compiler::compile_method(ciEnv*, ciMethod*, int)
00007f362f18f4c6 CompileBroker::invoke_compiler_on_method(CompileTask*)
00007f362f190b86 CompileBroker::compiler_thread_loop()
00007f362f70df03 JavaThread::thread_main_inner()
00007f362f5c7128 java_start(Thread*)
00007f363045470a start_thread
- java (20097)
56
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a3b0 pthread_cond_wait
00007f362f5825ee Monitor::notify()
00007f362f5c02d9 os::PlatformEvent::unpark()
00007f362f5bca2b os::start_thread(Thread*)
00007f362f3c95d3 JVM_StartThread
00007f3619017c80 Interpreter
- java (20804)
74
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a3b0 pthread_cond_wait
00007f362f769e4e VMThread::execute(VM_Operation*)
00007f363045a366 pthread_cond_wait
c86d8b4c00000000 [unknown]
- java (20804)
83
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a3b0 pthread_cond_wait
00007f36190004e7 call_stub
00007f362f3662b6 JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)
00007f362f3667c1 JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)
00007f362f366c67 JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)
00007f362f3cb370 thread_entry(JavaThread*, Thread*)
00007f362f70df03 JavaThread::thread_main_inner()
00007f362f5c7128 java_start(Thread*)
00007f363045470a start_thread
- java (20789)
98
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a3b0 pthread_cond_wait
00007f36190004e7 call_stub
00007f362f3662b6 JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)
00007f362f3667c1 JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)
00007f362f366c67 JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)
00007f362f3cb370 thread_entry(JavaThread*, Thread*)
00007f362f70df03 JavaThread::thread_main_inner()
00007f362f5c7128 java_start(Thread*)
00007f363045470a start_thread
- java (20804)
120
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a759 pthread_cond_timedwait@@GLIBC_2.3.2
00007f362efe356e Assembler::movq(RegisterImpl*, Address)
00007f36190f094c C1 temporary CodeBuffer
00000000000000a0 [unknown]
00007f35b403838e [unknown]
- java (20097)
2001242
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a759 pthread_cond_timedwait@@GLIBC_2.3.2
00007f362f583f26 Monitor::wait(bool, long, bool)
00007f362f70a791 WatcherThread::sleep() const
00007f362f70ac2e WatcherThread::run()
00007f362f5c7128 java_start(Thread*)
00007f363045470a start_thread
- java (20099)
3255014
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa108d805 schedule_timeout
ffffffffa0f57662 sk_wait_data
ffffffffa0fc1f55 tcp_recvmsg
ffffffffa0ff179e inet_recvmsg
ffffffffa0f5266d sock_recvmsg
ffffffffa0f528aa SYSC_recvfrom
ffffffffa0f53bee sys_recvfrom
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045d8cf __recv
00007f35a0017000 [unknown]
- java (20105)
4002890
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa108d805 schedule_timeout
ffffffffa0f57662 sk_wait_data
ffffffffa0fc1f55 tcp_recvmsg
ffffffffa0ff179e inet_recvmsg
ffffffffa0f5266d sock_recvmsg
ffffffffa0f528aa SYSC_recvfrom
ffffffffa0f53bee sys_recvfrom
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045d8cf __recv
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
00007f3612abfd0b [unknown]
- java (20105)
4002907
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a759 pthread_cond_timedwait@@GLIBC_2.3.2
00007f36190004e7 call_stub
00007f362f3662b6 JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)
00007f362f3667c1 JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)
00007f362f366c67 JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)
00007f362f3cb370 thread_entry(JavaThread*, Thread*)
00007f362f70df03 JavaThread::thread_main_inner()
00007f362f5c7128 java_start(Thread*)
00007f363045470a start_thread
- java (20804)
5000078
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a759 pthread_cond_timedwait@@GLIBC_2.3.2
- java (20097)
5000078
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a759 pthread_cond_timedwait@@GLIBC_2.3.2
00007f36280cdfb0 [unknown]
- java (20099)
6710550
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a759 pthread_cond_timedwait@@GLIBC_2.3.2
00007f362f19054b CompileQueue::get()
00007f362f19073b CompileBroker::compiler_thread_loop()
00007f362f70df03 JavaThread::thread_main_inner()
00007f362f5c7128 java_start(Thread*)
00007f363045470a start_thread
- java (20095)
7001835
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a759 pthread_cond_timedwait@@GLIBC_2.3.2
- java (20094)
7001847
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a759 pthread_cond_timedwait@@GLIBC_2.3.2
00007f362f19054b CompileQueue::get()
00007f362f19073b CompileBroker::compiler_thread_loop()
00007f362f70df03 JavaThread::thread_main_inner()
00007f362f5c7128 java_start(Thread*)
00007f363045470a start_thread
- java (20096)
7001872
ffffffffa08ac461 finish_task_switch
ffffffffa108a0a6 schedule
ffffffffa0908fd4 futex_wait_queue_me
ffffffffa0909c36 futex_wait
ffffffffa090bb27 do_futex
ffffffffa090c4b1 sys_futex
ffffffffa108ee7b entry_SYSCALL_64_fastpath
00007f363045a759 pthread_cond_timedwait@@GLIBC_2.3.2
00007f362f769580 VMThread::loop()
00007f362f769ad0 VMThread::run()
00007f362f5c7128 java_start(Thread*)
00007f363045470a start_thread
- java (20090)
9010205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.