all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tomohiro Matsuyama <tomo@cx4a.org>
Cc: eggert@cs.ucla.edu, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Elisp native profiler
Date: Thu, 27 Sep 2012 07:55:55 +0200	[thread overview]
Message-ID: <83wqzgf1qs.fsf@gnu.org> (raw)
In-Reply-To: <20120927074655.a943e298fc9319a438825f47@cx4a.org>

> Date: Thu, 27 Sep 2012 07:46:55 +0900
> From: Tomohiro Matsuyama <tomo@cx4a.org>
> Cc: eggert@cs.ucla.edu, monnier@iro.umontreal.ca, emacs-devel@gnu.org
> 
> > So what do you need, in addition to the name of the primitive, that is in
> > siginfo_t and ucontext_t?
> What I wanted to say here is that we need to get a stack pointer of the 
> running main thread to obtain C-level backtrace.

Sorry, I don't understand: if all you need is to profile primitives,
why do you need a full C-level backtrace?  The primitives called are
already available in the backtrace_list structure, aren't they?

> In my understand, the
> stack pointer is not available to other threads without firing signals.

It's possible on Windows.  If it isn't possible with pthreads, that's
just too bad.  Anyway, getting at the stack pointer does not yet give
you the backtrace.

> By the way, is it easy to obtain C-level backtrace?  gdb and addr2line might
> help me, but I want a small and portable library for that.

See emacs_backtrace on sysdep.c.  Not sure about the portability of
the underlying APIs.

AFAIK, any backtrace facility is specific to the object file format
and the debug info used by the platform.  Compiler optimizations and
various non-local jumps complicate things a lot.  My suggestion would
be not to go there, unless absolutely needed and desirable, because it
most probably be in a constant need of maintenance to keep up with
development of the underlying platform, compilers, etc.



  reply	other threads:[~2012-09-27  5:55 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-25  2:41 Elisp native profiler Stefan Monnier
2012-09-25 11:40 ` Juanma Barranquero
2012-09-25 13:18 ` Eli Zaretskii
2012-09-25 13:26   ` Eli Zaretskii
2012-09-25 17:28     ` Stefan Monnier
2012-09-25 19:21       ` Paul Eggert
2012-09-25 20:12         ` Eli Zaretskii
2012-09-26  0:55         ` Stefan Monnier
2012-09-26  6:16           ` Tomohiro Matsuyama
2012-09-26  7:35             ` Eli Zaretskii
2012-09-26  7:59               ` Tomohiro Matsuyama
2012-09-26  9:32                 ` Eli Zaretskii
2012-09-26 22:46                   ` Tomohiro Matsuyama
2012-09-27  5:55                     ` Eli Zaretskii [this message]
2012-09-27  7:01                       ` Eli Zaretskii
2012-09-27 12:37                         ` Stefan Monnier
2012-09-27 17:49                           ` Eli Zaretskii
2012-09-27 17:52                           ` Eli Zaretskii
2012-09-27 20:35                             ` Stefan Monnier
2012-09-27 20:46                               ` Eli Zaretskii
2012-09-27 22:12                                 ` Stefan Monnier
2012-09-28  7:09                                   ` Eli Zaretskii
2012-09-28  8:24                                     ` Stefan Monnier
2012-09-28 14:11                                       ` Eli Zaretskii
2012-09-28  8:03                                   ` Stephen Berman
2012-09-28  8:26                                     ` Stefan Monnier
2012-09-30  7:39                         ` Paul Eggert
2012-09-30  7:58                           ` Eli Zaretskii
2012-09-28 10:09                       ` Tomohiro Matsuyama
2012-09-28 11:05                         ` Eli Zaretskii
2012-09-28 12:43                           ` Stefan Monnier
2012-09-28 14:16                             ` Eli Zaretskii
2012-09-28 20:11                               ` Stefan Monnier
2012-09-28 20:14                                 ` Eli Zaretskii
2012-09-29  2:13                                   ` Stefan Monnier
2012-09-28 12:40                         ` Stefan Monnier
2012-09-26 17:42             ` Stefan Monnier
2012-09-26 22:52               ` Tomohiro Matsuyama
2012-09-28  9:14               ` Tomohiro Matsuyama
2012-09-28 11:00                 ` Eli Zaretskii
2012-09-30  7:37                   ` Paul Eggert
2012-09-30  7:58                     ` Eli Zaretskii
2012-09-30  8:16                       ` Paul Eggert
2012-09-28 12:37                 ` Stefan Monnier
2012-09-30 16:42               ` Tomohiro Matsuyama
2012-09-30 19:23                 ` Paul Eggert
2012-09-30 20:13                   ` Stefan Monnier
2012-09-30 20:43                     ` Paul Eggert
2012-10-01  0:41                       ` Stefan Monnier
2012-10-01  1:49                         ` Paul Eggert
2012-10-01 14:25                           ` Stefan Monnier
2012-10-01 14:48                             ` Eli Zaretskii
2012-10-01 16:31                               ` Stefan Monnier
2012-10-01 17:19                                 ` Eli Zaretskii
2012-10-01 16:41                               ` Paul Eggert
2012-10-01 17:52                                 ` Eli Zaretskii
2012-10-01 17:59                                   ` Eli Zaretskii
2012-10-01 21:12                                     ` Eli Zaretskii
2012-10-01 22:21                                   ` Paul Eggert
2012-10-02  2:06                                   ` Stefan Monnier
2012-10-02  4:00                                     ` Eli Zaretskii
2012-10-02 12:58                                       ` Stefan Monnier
2012-10-02 17:14                                         ` Eli Zaretskii
2012-10-03  1:27                                           ` Stefan Monnier
2012-10-02  5:28                                     ` Paul Eggert
2012-10-02 13:00                                       ` Stefan Monnier
2012-10-02 16:17                                         ` Paul Eggert
2012-10-02 13:23                                   ` Jason Rumney
2012-10-02 17:20                                     ` Eli Zaretskii
2012-10-03 14:25                                       ` Jason Rumney
2012-10-03 17:43                                         ` Eli Zaretskii
2012-10-01 15:10                             ` Paul Eggert
2012-10-01 10:37                       ` Eli Zaretskii
2012-10-01 11:25                         ` Tomohiro Matsuyama
2012-10-01 14:59                           ` Paul Eggert
2012-10-01 14:54                         ` Paul Eggert
2012-10-01 15:28                           ` Eli Zaretskii
2012-10-01 16:34                             ` Stefan Monnier
2012-10-01 16:51                               ` Paul Eggert
     [not found]                                 ` <1349123390.31932.1@faina>
2012-10-02  6:41                                   ` Paul Eggert
2012-10-02 13:03                                     ` Stefan Monnier
2012-10-03  5:11                                       ` Paul Eggert
2012-10-03 12:50                                         ` Stefan Monnier
2012-10-03 14:06                                           ` Andreas Schwab
2012-10-03 17:22                                             ` Stefan Monnier
2012-10-03 17:39                                           ` Eli Zaretskii
2012-10-01 16:39                             ` Paul Eggert
2012-09-30 22:28                     ` Tomohiro Matsuyama
2012-09-30 22:26                   ` Tomohiro Matsuyama
2012-09-26  7:39         ` Tomohiro Matsuyama
2012-09-26 14:33           ` Paul Eggert
2012-09-26 18:58             ` Ivan Andrus
2012-09-27  1:11               ` Paul Eggert
2012-09-25 20:10       ` Eli Zaretskii
2012-09-26  0:53         ` Stefan Monnier
2012-09-26  0:30       ` Stephen J. Turnbull
2012-09-26  1:00     ` Stefan Monnier
2012-09-26  7:41       ` Eli Zaretskii
2012-09-26 12:55         ` Stefan Monnier
2012-09-26 13:19           ` Eli Zaretskii
2012-09-26 13:26             ` Eli Zaretskii
2012-09-26 17:49               ` Stefan Monnier
2012-09-26 19:31                 ` Eli Zaretskii
2012-09-26 20:20                   ` Stefan Monnier
2012-09-26 22:50                     ` Tomohiro Matsuyama
2012-09-27  4:02                       ` Stefan Monnier
2012-09-30  7:32                         ` Paul Eggert
2012-09-29 15:24                 ` Eli Zaretskii
2012-09-29 16:06                   ` Stefan Monnier
2012-09-29 16:18                     ` Eli Zaretskii
2012-09-29 20:17                       ` Stefan Monnier
2012-09-30 15:54             ` Eli Zaretskii
2012-09-25 13:40   ` Juanma Barranquero

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=83wqzgf1qs.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=tomo@cx4a.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.