[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Elisp native profiler
From: |
Eli Zaretskii |
Subject: |
Re: Elisp native profiler |
Date: |
Thu, 27 Sep 2012 07:55:55 +0200 |
> Date: Thu, 27 Sep 2012 07:46:55 +0900
> From: Tomohiro Matsuyama <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
>
> > 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.
- Re: Elisp native profiler, (continued)
- Re: Elisp native profiler, Eli Zaretskii, 2012/09/25
- Re: Elisp native profiler, Stefan Monnier, 2012/09/25
- Re: Elisp native profiler, Paul Eggert, 2012/09/25
- Re: Elisp native profiler, Eli Zaretskii, 2012/09/25
- Re: Elisp native profiler, Stefan Monnier, 2012/09/25
- Re: Elisp native profiler, Tomohiro Matsuyama, 2012/09/26
- Re: Elisp native profiler, Eli Zaretskii, 2012/09/26
- Re: Elisp native profiler, Tomohiro Matsuyama, 2012/09/26
- Re: Elisp native profiler, Eli Zaretskii, 2012/09/26
- Re: Elisp native profiler, Tomohiro Matsuyama, 2012/09/26
- Re: Elisp native profiler,
Eli Zaretskii <=
- Re: Elisp native profiler, Eli Zaretskii, 2012/09/27
- Re: Elisp native profiler, Stefan Monnier, 2012/09/27
- Re: Elisp native profiler, Eli Zaretskii, 2012/09/27
- Re: Elisp native profiler, Eli Zaretskii, 2012/09/27
- Re: Elisp native profiler, Stefan Monnier, 2012/09/27
- Re: Elisp native profiler, Eli Zaretskii, 2012/09/27
- Re: Elisp native profiler, Stefan Monnier, 2012/09/27
- Re: Elisp native profiler, Eli Zaretskii, 2012/09/28
- Re: Elisp native profiler, Stefan Monnier, 2012/09/28
- Re: Elisp native profiler, Eli Zaretskii, 2012/09/28