GithubHelp home page GithubHelp logo

see-later / sample-profiler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clozure/sample-profiler

0.0 0.0 0.0 20 KB

Collect and display sample profiling data

License: Apache License 2.0

Common Lisp 79.83% HTML 20.17%

sample-profiler's Introduction

sample-profiler

Runs an external probabilistic sampling profiler over a lisp image, interprets its output, and produces an HTML file with the profiling results in the form of a collapsible call tree. Each node in the tree shows the number of samples followed by the description of the function sampled.

Currently only works in CCL on MacOS X (using the sample program).

Usage

The following symbols are defined in the sample-profiler package:

(start-profiling &key (seconds T) (verbose nil) (output-file "profile.html"))

Starts profiling the current lisp image. seconds can be a number to automatically stop profiling after that many seconds. The default is T meaning don't stop until requested. output-file specifies the default file to use for output. The file is not actually created until end-profiling is called, and can be overridden at that time. If verbose is true, shows output from the external profiler process.

(end-profiling &key abort (verbose nil) output-file)

Ends the current profiling session. If abort is specified, kills the profiler process without waiting for the result, otherwise tries to terminate gracefully and process the results into the output file. if output-file is specified, it overrides the value given in the call to start-profiling. If verbose is true, shows output from the external profiler process.

*show-foreign-address*

If true, descriptions of foreign functions include their hex address. The default is NIL.

Known bugs and missing features

  • Only recognizes functions created before start-profiling is called. Functions created during the profiling session (by invoking the compiler or loading fasl files) are not recognized and show up as hex addresses in the dynamic heap.

  • Doesn't work on linux. (Need something similar to MacOsX's sample program.)

  • In addition to the count, should show percentage of total samples.

  • Should be able to filter on percentage, not just count

  • Should be able to specify expand to max depth

  • Should combine sibling entries of the same lisp function into one entry.

  • Need an option to expand-all-children for any node.

  • Need an option to set root to any node (i.e. focus on a branch).

  • Option to combine samples at different offsets of the same function.

  • There should be an option to automatically open a browser window with the output. In the IDE, might want to open a webview within the CCL app.

sample-profiler's People

Contributors

gzacharias 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.