Git Product home page Git Product logo

ceefour / wincachegrind Goto Github PK

View Code? Open in Web Editor NEW
191.0 30.0 29.0 496 KB

[NO LONGER MAINTAINED] WinCacheGrind is a viewer for cachegrind.out files generated by xdebug 2. WinCacheGrind is functionally similar to KCacheGrind, only it is much simpler and runs on Windows.

Home Page: https://ceefour.github.io/wincachegrind

License: GNU General Public License v3.0

Pascal 99.96% Batchfile 0.04%
php xdebug debug profiler kcachegrind valgrind

wincachegrind's Introduction

WinCacheGrind

by Hendy Irawan

WinCacheGrind is a viewer for cachegrind.out files generated by xdebug 2. WinCacheGrind is functionally similar to KCacheGrind, only it is much simpler and runs on Windows.

Project started: Jan 17, 2005 around 6 o'clock in the morning West Indonesia Time

PROJECT IS NO LONGER MAINTAINED

WinCacheGrind is no longer maintained.

You may have better luck with QCacheGrind, which is a popular alternative for Windows.

  • Hendy

Overview

This project is a KCacheGrind-wannabe for Windows. At least it can process cachegrind.out of xdebug-2.0.0 beta 1 for PHP. To view version of this program please use Help, About.

Usage

Just open a cachegrind.out file and do clicks anywhere you want.

Please do also right clicks since many things in this program are right-clickable, and some features are only accessible using a right click.

As an added bonus, you can drag and drop as many files as you want from Windows Explorer to the WinCacheGrind window.

Don't get too excited dropping too many files, though :-P (WinCacheGrind loads all data into memory).

License

This program uses GNU General Public License v3 license. Please see LICENSE for complete license.

File format

cachegrind.out file format is "guessed" and the guesses are described in cachegrind.out File Format.md file.

Quirks & Known Issues

  • May (or will) not work with anything other than xdebug-2.0.0 beta 1 output.

  • Constructor and destructor type is guessed and hardcoded, since there is no actual information whether a particular function is a constructor/destructor.

  • No function parameters (non-existant information)

  • The overall/merged list only filters functions, but all the displayed information is within global scope i.e. the number of calls, percentage, times, etc. are collected from the entire profile, not only inside the node/function that you select in the tree control.

  • Any very small time value (nearing 0ms or 0%) will be displayed as "-".

    This is not a bug but it's just to clean up the user interface so you won't have to see lots of zeros. I think this is much nicer because you won't care about superlightning speed functions anyway.

  • TONS OF BUGS :-P

  • As of xdebug 2.0.0 beta 1 it has some odd behavior sometimes, in that it doesn't print "summary:" line and some functions are printed but never called, which is bizarre. It is okay for {main} and exit procedures/destructors, since they're called automatically by PHP. But this happens in ordinarily called functions, so I believe it is a bug in xdebug. And it also doesn't give any information about {main}, which is very frustrating.

    WinCacheGrind will try its best to read such files, it should give you accurate time values. However, in this case the call structure will definitely not reflect the actual run.

    Update: After some experimentation it turns out that one of the causes for this is usage of exit() or die() PHP function. Changing this to return() solves the problem. However it should be noted that return() is not a substitute for die/exit, especially the fact that return will only terminate a script if used inside the main script, not a function or an included file.

    I will try to report this to xdebug author.

  • Memory leaks!!! I tried to use MemProof to fix this but I can't seem to use it well, and most of the time MemProof shows number of errors but the error list is empty. :-(

    By the way, Delphi 7 had tons of memory leaks, so I have no too big problem with this. :-P

  • Largest file tested: 10 MB cachegrind.out file, 8 MB memory usage File parsing/loading takes several seconds, but after that everything is quick, even column sorting, finding, etc. BTW this is a script which takes 10 seconds to run! (it's a script to update MDB database schemas) So for your everyday script (which is usually less than 1 or 2 seconds runtime) WinCacheGrind should have no problems handling these.

Wish List

  • Graphical "time bar" on every time value

    Not that I haven't tried, but the first thing, Delphi doesn't provide much information for drawing owner-drawn subitems in a list view (it seems that we have to figure out the TRect by ourselves). And the ugliest thing is that when resizing a column, the column width property isn't updated until after the resize is done. And it doesn't even repaint!

    Any help on this will be highly appreciated.

  • Add filtering options, e.g. minimum number of calls, minimum time, etc.

  • Prevent Delphi from reordering the MDI child windows everytime a window is activated. It's so annoying! :-(

  • Speed up loading. Currently I think the main speed boost would be if I can utilize binary search in the loading function. I'm too lazy to implement something like that. :-(

    Update: Now it uses JCL's string hash map, it's a bit faster than before, but not as fast than I'd imagine. :-(

Development

I make no guarantee that I will continue to develop this program. But if you plan to continue developing this project or derive a work based on this please notify me first so there won't be too many branches if there're more than one interested person.

Source Code

Source code is available at https://github.com/ceefour/wincachegrind . I am expecting some people to be interested in developing this project so I don't want too many different independent works based on this project.

Compiling the source

To compile the source, you need the following:

Credits & Acknowledgments

  • Xdebug

    The thing that made me had to do this. ;-)

  • KCacheGrind

    If it runs on Windows (without KDE+Cygwin), I really won't have to do this.

  • CacheGrind

    For the "comprehensive" file format explanation. :-P

  • phpDocumentor

    Where I got those cute icons. :-D

wincachegrind's People

Contributors

ceefour avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wincachegrind's Issues

Wingrind does not understand compressed file and function names

Xdebug 2.3 has implemented file and function name compression as per the specs at http://valgrind.org/docs/manual/cl-format.html#cl-format.overview.compression1

The Xdebug issue for this is http://bugs.xdebug.org/view.php?id=1054 and PR #154 is at xdebug/xdebug#154

As this changes created cachegrind files, Wincachegrind needs to add support for this. This had been reported as an issue on the Xdebug issue tracker at http://bugs.xdebug.org/view.php?id=1115

Out of memory error

Tried to open a 8 GB PHP generated cachegrind file and after some time i got an out of memory error. I assume this is because it is a 32bit application? Is there anything I can do about it except of compiling it by myself?

Duplicate hash list entry: fl-32 in 1.1

hi, thanx for your great tool. Gave me a lot of insight already.
With the latest version 1.1 Im getting this error with a file (200Mb)

Duplicate hash list entry: fl-32

I dont get it with 1.0.0.14.

Access violation

I get this on the very first chachegrind file I try:

Access violation at address 004A5908 in module 'WinCacheGrind.exe'. Read of address 00000000.

PHP 5.6.31, XDebug 2.5.5, file is 1.49 GB

Inverse regex

Ive been trying to make a inverse regex working for a while now, but with no luck. Is it actually possible with tregexpr? It would add signficant value to the tool.

Inaccurate measurements of time (under some/all conditions?)

From Ephraim Rubenstein [email protected] :

I downloaded 3 Cachegrind viewers today.

  1. WebCacheGrind 1.1.0.16
  2. WebGrind and
  3. QCacheGring

WebCacheGrind is showing measurements approx 1/10 of the other 2

WebCacheGrind Zend\MVC\Application->init 49ms
WebGrind 492ms and
QCacheGrind 492 253 (microsecs)

This does not make sense .

Can you advise?

TIA

Efffy

How to use it?

i have downloaded the zip file and extract it but I can't see any .exe file, i have some .out profiler files generated by xdebug, i tried to right click them but no new option showed

Call for new maintainers

The last commit has been pushed 6 years ago. The current owner no longer has the time to maintain this repository. For this repository to stay relevant, it needs new maintainers that can fix the problems in the issues list. Anybody that feels that they want to take this on, please comment in this issue.

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.