public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: Mark Geisert <mark@maxrnd.com>,
	Cygwin Patches <cygwin-patches@cygwin.com>
Subject: Re: [PATCH] Cygwin: New tool: cygmon
Date: Sun, 13 Jun 2021 15:40:56 +0100	[thread overview]
Message-ID: <6c87c0bd-bc3c-f2b0-f318-26afadfebf1f@dronecode.org.uk> (raw)
In-Reply-To: <20210612064639.2107-1-mark@maxrnd.com>

On 12/06/2021 07:46, Mark Geisert wrote:
> This tool is a sampling profiler of Cygwin programs with their DLLs.
> Presently its development is managed at https://github.com/mgeisert/cygmon.
> Documentation of cygmon has been added to the usual doc/utils.xml file.

Nice!

How attached are you to the name?

There's nothing cygwin specific about this (you could profile any 
Windows executable), so does it really need 'cyg' in the name?

It's a profiler, so what is 'mon' short for?

A more detailed review to follow.

> There are a couple of one-line fixes to unrelated files for minor issues
> noticed while implementing cygmon.  The files involved are gmon.c and
> doc/utils.xml (one line not part of the cygmon updates to that file).

Please submit the gmon fix as a separate patch, ideally with some 
commentary about what it fixes.

> diff --git a/winsup/doc/utils.xml b/winsup/doc/utils.xml
> index 22bd86904..2f256d602 100644
> --- a/winsup/doc/utils.xml
> +++ b/winsup/doc/utils.xml
[...]
> +
> +    <refsect1 id="cygmon-desc">
> +      <title>Description</title>
> +    <para>The <command>cygmon</command> utility executes a given program, and
> +      optionally the children of that program, collecting the location of the
> +      CPU instruction pointer (IP) many times per second. This gives a profile
> +      of the program's execution, showing where the most time is being spent.
> +      This profiling technique is called "IP sampling".</para>

Contrasting this with how 'ssp' profiles (and vice versa there) would be 
nice.

> +
> +    <para>A novel feature of <command>cygmon</command> is that time spent in
> +      DLLs loaded with or by your program is profiled too. You use
> +      <command>gprof</command> to process and display the resulting profile
> +      information. In this fashion you can determine whether your own code,
> +      the Cygwin DLL, or another DLL has "hot spots" that might benefit from
> +      tuning.</para>
> +
> +    <para> Note that <command>cygmon</command> is a native Windows program
> +      and so does not rely on the Cygwin DLL itself (you can verify this with
> +      <command>cygcheck</command>). As a result it does not understand
> +      symlinks in its command line.</para>
> +    </refsect1>


  reply	other threads:[~2021-06-13 14:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12  6:46 Mark Geisert
2021-06-13 14:40 ` Jon Turney [this message]
2021-06-15  8:48   ` Mark Geisert
2021-06-13 14:46 ` Jon Turney
2021-06-17  5:59   ` Mark Geisert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c87c0bd-bc3c-f2b0-f318-26afadfebf1f@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin-patches@cygwin.com \
    --cc=mark@maxrnd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).