A JSP to print all the stacks
<%@ page import="java.util.*" %><% Map<Thread,StackTraceElement[]> map = Thread.getAllStackTraces(); Set tt = map.keySet(); Iterator<Thread> ti = tt.iterator(); Thread thrd = null; final String br = "<" + "br" + ">";//website does not parse it try{ int cnt = 1; StackTraceElement[] st = null; while(ti.hasNext() ){ thrd = ti.next(); out.print(br + "<" + "hr" + ">" + br + cnt + " \"" + thrd.getName()); out.println("\", priority :" + thrd.getPriority() + ", state :" + thrd.getState()); out.print(", id :" + thrd.getId() + ", hex :" + Long.toHexString(thrd.getId()) ); out.print(" alive :" + thrd.isAlive() + ", daemon :" + thrd.isDaemon() ); out.print(" interrupted :" + thrd.isInterrupted() + ", daemon :" + thrd.isDaemon() ); out.print(".\n" + br); st = thrd.getStackTrace(); for(int sti = 0; sti < st.length; sti++){ out.println(br + " " + st[sti].getClassName() + "." + st[sti].getMethodName()); out.println("(" + st[sti].getFileName()); if(st[sti].getLineNumber() < 1){ out.print("Native method"); }else{ out.print(":" + st[sti].getLineNumber()); } out.println(")"); } out.println(""); cnt++; } }catch(Exception e){ out.println(br + "err " + e + br); } %>
相关推荐
After having to deal with both compiler, interpreter, OS emulator, and OS porting issues for the Sparc, I decided to gather notes and documentation in one place. If there are any issues you don't ...
Eclipse IoT White Paper - The Three Software Stacks Required for IoT Architectures
This is followed by an introduction to linked lists and the implementation of stacks and queues using references. Next, there is an introduction to binary trees, a discussion of various • Chapter 1...
In the first chapter, I will provide a fuller introduction to the book architecture and chapter contents. I will describe the big data stack structure as well as extended topics such as scaling and ...
When you finish, you'll have all the skills you need to build a dynamic data-driven web application. What's Inside Full-stack development using JavaScript Responsive web techniques Everything you ...
The book begins with a discussion on the fundamentals of data structures and algorithms, and moves on to the concepts of linear data structures, stacks, recursion, queues, and searching and sorting....
application scripts to make the same API calls to the network protocol stacks that real applications make, causing the protocol stacks to perform the same work involved in sending and receiving data ...
If you are preparing for an interview or want to challenge yourself, then this book will cover all the fundamentals asked at major companies such as Amazon, Google, and Microsoft. This book will ...
这款小工具可以可以让Windows 7/Vista/XP拥有苹果系统里的stacks功能。使用后会在Windows 7的任务栏(Vista和XP系统则是快速启动栏)里增加一个指向特定文件夹的stacks图标,通过它可以对各种程序图标进行归类整理,让...
Peter Magnusson的文章,英文版,9页
One way to implement these features is to use two stacks to keep track of the pages that can be reached by moving backward and forward. In this problem, you are asked to implement this. The ...
The Lifetime of a Java Virtual Machine The Architecture of the Java Virtual Machine Data Types Word Size The Class Loader Subsystem Loading, Linking and Initialization The Primordial Class ...
Part 2 introduces you to the C++ Standard Library and Boost Libraries, where you’ll learn about all of the high-quality, fully-featured facilities available to you. You’ll cover special utility ...
For a process to access 3 GB of address space, the executable image must have been linked with the /LARGEADDRESSAWARE flag or modified using Imagecfg.exe. It should be pointed out that SQL Server was ...
This is a deeply technical book and focuses on the software engineering skills to ace your interview. The book is over 500 pages and includes 150 programming interview questions and answers, as well ...
This is a deeply technical book and focuses on the software engineering skills to ace your interview. The book is over 500 pages and includes 150 programming interview questions and answers, as well ...
Printn prints a number n in base b. We don t use recursion to avoid deep kernel stacks.
The book aims to provide a comprehensive coverage of all the topics related to data structures. The book begins with a discussion on the fundamentals of data structures and algorithms, and moves on ...
interfaces) to interact with the upper layer (application, libraries and stacks). The HAL driver APIs are split into two categories: generic APIs which provide common and generic functions for all ...