GithubHelp home page GithubHelp logo

nirmaljeffrey / extended-stacktrace Goto Github PK

View Code? Open in Web Editor NEW

This project forked from puniverse/extended-stacktrace

0.0 1.0 0.0 244 KB

Enhanced stack traces for the JVM

License: GNU General Public License v2.0

Java 100.00%

extended-stacktrace's Introduction

Extended Stack-Trace
Enhanced stack traces for the JVM

This library allows you to capture stack traces with more information than Throwable.getStackTrace. In addition to the information in the JDK's StackTraceElement The captured stack elements contain:

  • The decalaring class -- the actual Class object -- not just the name.
  • The method -- the actual Method object -- not just the method name.
  • The bytecode index

Works best when running on a Java 8 HotSpot (OpenJDK/Oracle JDK) JVM.

Status

Advanced Beta. Used in Quasar.

Usage

  1. Clone and build the repository with ./gradlew or use Maven artifact co.paralleluniverse:extended-stacktrace:0.1.0-SNAPSHOT from the Sonatype snapshot repository (https://oss.sonatype.org/content/repositories/snapshots)

  2. Add the JAR file to your dependencies.

  3. Obtain the extended stack trace information with ExtendedStackTrace.here() or ExtendedStackTrace.of(Throwable)

Please consult the Javadocs for detailed information.

Details

On the HotSpot JVM (OpenJDK/Oracle JDK) for Java 8, the extended information is always available (via some deep hacking), and obtaining it is as efficient as a plain Throwable.getStackTrace().

On other JVMs/Java versions the extended information may be incomplete. There are (much) better chances for obtaining extended information when capturing the stack with ExtendedStackTrace.here() than when extracting extended information from a Throwable with ExtendedStackTrace.of(Throwable). Also, getting the method object carries a significant cost.

License

This project is free software free software published under the following license:

Copyright (c) 2015, Parallel Universe Software Co. All rights reserved.

This program and the accompanying materials are licensed under
GNU General Public License, version 2, with the Classpath Exception (same as OpenJDK)
 
http://openjdk.java.net/legal/gplv2+ce.html

extended-stacktrace's People

Contributors

pron avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.