PHPFlüsterer

XHGUI für XHProf – Windows Version

Für den PHP Software-Profiler XHProf wird von Facebook eine GUI mitgeliefert. Bei genauerer Betrachtung stellt man aber schnell fest, dass diese bei der optischen Erscheinung ein paar Wünsche offen lässt.  Der kanadische Softwareentwickler Paul Preinheimer dachte sich das gleiche und hat sich des Problems angenommen und die GUI um die “highchart” charting library (JavaScript) erweitert und an vielen anderen Stellen entsprechend angepasst.

Screenshot XHGUI mit Highchart

Heute habe ich die XHGUI um einige Switches erweitert, so daß diese auch auch Windows-Systemen einwandfrei genutzt werden kann. Paul Preinheimer hat die Änderungen schon in sein Repo auf Github übernommen, so daß ihr euch die XHGUI direkt von dort auschecken könnt.

Für diejenigen unter euch, die sich jetzt wundern was ich mit der XHGUI unter Windows anfangen möchte, die möchte ich hiermit informieren daß eine angepasste und für Windows kompilierte Version von XHProf (php_xprof.dll) von mir im Laufe des heutigen Tages bereitgestellt wird. Somit kann auch auf Windows-basierten Entwicklungssystemen mit XHProf gearbeitet werden. Ich habe diese dringend benötigt, nirgendwo fertig gefunden und deshalb nach Jahren mal wieder meinen C-Compiler angeschmissen. Mehr dazu im Laufe des heutigen Tages …

Die angepasste XHGUI findet ihr hier

Categories: Toolchain

XHProf PHP-extension 0.10.0 – Windows-Build » « Erkennen des Character-Encodings durch MAGIC-Field

9 Comments

  1. I’ve got a version of XHProf that runs on windows already, there’s an issue with CPU cycles not being recorded properly, but the extension works otherwise.

    • Hi Paul,

      it seems that i stuck on the same issues :(

      I’m not sure exactly but maybe it’s caused by the Speedstep-technology. Wikipedia says: … Intel SpeedStep technology transitions may also impact the processor clock … http://en.wikipedia.org/wiki/Time_Stamp_Counter. i didn’t find any asm examples to disable speedstep by code …

      … but anyway – how did you get the sources compiled? i had to add so much missing parts like a custom (win) getrusage(), CPU_SET(), CPU_ZERO, SET_AFFINITY, GET_AFFINITY …

      did you publish it anywhere – i’ve searched a long time but couldn’t find any win-compatible releases of XHProf …

  2. @Paul and @Benjamin

    What’s about posting the patches and report a bug to pecl? So other can review or apply them?

    Also, looking at the implementation in general, I’m not sure relying on CPU cycles is a good idea for profiling apps, especially not at the PHP level. There are some papers out there about the reasons.

    I’d to be happy to give a hand for the windows port, Windows has APIs for profiling apps :)

    • @Pierre

      The patches was applied to a modified version of the original source by Facebook (you can find the changes at Pauls github repo) so I’m currently not sure if they could be applied or if there was more changed than the parts I’ve touched. But i will get in contact with Paul to check that.

      I’m also in contact with Facebook. My changes to the extension will hopefully be deployed to all existing repositories soon.

      What do you mean exactly with “I’m not sure relying on CPU cycles is a good idea for profiling apps, especially not at the PHP level. There are some papers out there about the reasons“? If you mean the RDTSC and the possible problem caused by the missing synch between cores of a multicore cpu than it’s not really a problem cause the XHProf process get bound to a single core on each call. One possible and well known problem is the SpeedStep-Technology by Intel which reduces the frequency of a CPU dynamically while running. This feature must be disabled for profiling.

      And finally some words to “I’d to be happy to give a hand for the windows port, Windows has APIs for profiling apps :)
      Which APIs do you mean? btw: I don’t think that it would be a good idea to change the way of profiling on the windows platform only. I’m interested – if you have a concrete idea on improving the way of profiling – in a solution which could be realized on all platforms (win, linux, mac).

  3. The repo is here: http://svn.php.net/viewvc/pecl/xhprof/

    github is great to work on patches but if patches stay there only forever, it is pointless, as in never got submitted upstream.

    There are other issues than speedstep, I don’t the links at hand but there are a couple of papers describing these problems out there.

    “Which APIs do you mean? btw: I don’t think that it would be a good idea to change the way of profiling on the windows platform only. I’m interested – if you have a concrete idea on improving the way of profiling – in a solution which could be realized on all platforms (win, linux, mac).”

    The results can be shown in a consistent way on all platforms, but I doubt it is possible to rely on the same APIs (if available at all) on all platforms. On Windows the performance counter APIs are very handy and reliable, for example.

  4. Gibts schon das php_xhprof.dll irgendwo? Viel Dank

  5. Sebastian Brandt

    2011-06-06 — 2:44 PM

    Hi Benjamin,

    it would be great if you can write down a small how to compile for windows.
    I need a NTS Version for the Zend CE Server and Zend Server. At the moment it is php 5.3.5 VC9 NTS

    sincerely
    Sebastian Brandt

  6. Hi Sebastian,

    i have published a small how-to already. You can find it within the extension folder at github:
    https://github.com/clickalicious/xhprof/blob/master/extension/win32/README
    (the file README)

    But i think you will need the VC9 compiler.

    I’ve found some basic information on compiling PHP on Windows here: http://www.php.net/manual/en/install.windows.building.php and here: https://wiki.php.net/internals/windows/stepbystepbuild

    and finally a how-to here: http://blargh.tommymontgomery.com/2009/10/compiling-php-on-windows-64-bit-with-vc9/

Leave a Reply

Your email address will not be published.

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2014 PHPFlüsterer

Theme by Anders NorenUp ↑