From: Alex Gramiak <agrambot@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Re: Using __builtin_expect (likely/unlikely macros)
Date: Tue, 16 Apr 2019 15:11:58 -0600 [thread overview]
Message-ID: <87o955bqox.fsf@gmail.com> (raw)
In-Reply-To: <87sguhbrof.fsf@gmail.com> (Alex Gramiak's message of "Tue, 16 Apr 2019 14:50:40 -0600")
[-- Attachment #1: Type: text/plain, Size: 6707 bytes --]
Alex Gramiak <agrambot@gmail.com> writes:
> Perhaps I was too overzealous with the hot tagging?
I definitely was, since I removed the _Hot attributes from the
*malloc/free procedures, which turned out to be in bad judgment.
Removing those yielded:
Performance counter stats for 'src/emacs.hot-cold -f kill-emacs' (20 runs):
751.22 msec task-clock:u # 0.841 CPUs utilized ( +- 0.14% )
0 context-switches:u # 0.000 K/sec
0 cpu-migrations:u # 0.000 K/sec
12,928 page-faults:u # 0.017 M/sec ( +- 0.02% )
2,959,142,867 cycles:u # 3.939 GHz ( +- 0.05% )
1,350,640,657 stalled-cycles-frontend:u # 45.64% frontend cycles idle ( +- 0.12% )
972,612,724 stalled-cycles-backend:u # 32.87% backend cycles idle ( +- 0.15% )
4,865,119,525 instructions:u # 1.64 insn per cycle
# 0.28 stalled cycles per insn ( +- 0.00% )
1,035,582,401 branches:u # 1378.539 M/sec ( +- 0.00% )
17,794,068 branch-misses:u # 1.72% of all branches ( +- 0.14% )
1,206,398,515 L1-dcache-loads:u # 1605.925 M/sec ( +- 0.00% )
42,095,141 L1-dcache-load-misses:u # 3.49% of all L1-dcache hits ( +- 0.05% )
9,057,830 LLC-loads:u # 12.058 M/sec ( +- 0.39% )
<not supported> LLC-load-misses:u
0.89309 +- 0.00484 seconds time elapsed ( +- 0.54% )
I also realized that I completely forgot putting the attribute on
emacs_abort. With the _Cold attribute on emacs_abort:
Performance counter stats for 'src/emacs -f kill-emacs' (20 runs):
760.73 msec task-clock:u # 0.846 CPUs utilized ( +- 0.22% )
0 context-switches:u # 0.000 K/sec
0 cpu-migrations:u # 0.000 K/sec
12,925 page-faults:u # 0.017 M/sec ( +- 0.02% )
2,991,729,656 cycles:u # 3.933 GHz ( +- 0.04% )
1,388,332,047 stalled-cycles-frontend:u # 46.41% frontend cycles idle ( +- 0.13% )
976,840,303 stalled-cycles-backend:u # 32.65% backend cycles idle ( +- 0.17% )
4,867,077,504 instructions:u # 1.63 insn per cycle
# 0.29 stalled cycles per insn ( +- 0.00% )
1,036,158,051 branches:u # 1362.059 M/sec ( +- 0.00% )
17,860,346 branch-misses:u # 1.72% of all branches ( +- 0.19% )
1,207,924,887 L1-dcache-loads:u # 1587.852 M/sec ( +- 0.00% )
42,358,754 L1-dcache-load-misses:u # 3.51% of all L1-dcache hits ( +- 0.06% )
9,046,859 LLC-loads:u # 11.892 M/sec ( +- 0.32% )
<not supported> LLC-load-misses:u
0.89896 +- 0.00200 seconds time elapsed ( +- 0.22% )
Performance counter stats for 'src/emacs.cold -f kill-emacs' (20 runs):
755.78 msec task-clock:u # 0.845 CPUs utilized ( +- 0.18% )
0 context-switches:u # 0.000 K/sec
0 cpu-migrations:u # 0.000 K/sec
12,929 page-faults:u # 0.017 M/sec ( +- 0.02% )
2,978,556,838 cycles:u # 3.941 GHz ( +- 0.05% )
1,370,387,120 stalled-cycles-frontend:u # 46.01% frontend cycles idle ( +- 0.12% )
978,514,384 stalled-cycles-backend:u # 32.85% backend cycles idle ( +- 0.16% )
4,866,672,758 instructions:u # 1.63 insn per cycle
# 0.28 stalled cycles per insn ( +- 0.00% )
1,035,997,172 branches:u # 1370.762 M/sec ( +- 0.00% )
17,838,674 branch-misses:u # 1.72% of all branches ( +- 0.13% )
1,206,937,944 L1-dcache-loads:u # 1596.939 M/sec ( +- 0.00% )
42,110,067 L1-dcache-load-misses:u # 3.49% of all L1-dcache hits ( +- 0.05% )
9,088,714 LLC-loads:u # 12.026 M/sec ( +- 0.28% )
<not supported> LLC-load-misses:u
0.89401 +- 0.00185 seconds time elapsed ( +- 0.21% )
Performance counter stats for 'src/emacs.hot-cold -f kill-emacs' (20 runs):
752.56 msec task-clock:u # 0.846 CPUs utilized ( +- 0.18% )
0 context-switches:u # 0.000 K/sec
0 cpu-migrations:u # 0.000 K/sec
12,923 page-faults:u # 0.017 M/sec ( +- 0.01% )
2,973,502,618 cycles:u # 3.951 GHz ( +- 0.05% )
1,368,004,926 stalled-cycles-frontend:u # 46.01% frontend cycles idle ( +- 0.11% )
974,077,949 stalled-cycles-backend:u # 32.76% backend cycles idle ( +- 0.13% )
4,865,128,800 instructions:u # 1.64 insn per cycle
# 0.28 stalled cycles per insn ( +- 0.00% )
1,035,577,546 branches:u # 1376.070 M/sec ( +- 0.00% )
17,721,035 branch-misses:u # 1.71% of all branches ( +- 0.17% )
1,206,420,627 L1-dcache-loads:u # 1603.086 M/sec ( +- 0.00% )
42,129,928 L1-dcache-load-misses:u # 3.49% of all L1-dcache hits ( +- 0.04% )
9,033,444 LLC-loads:u # 12.004 M/sec ( +- 0.40% )
<not supported> LLC-load-misses:u
0.88928 +- 0.00161 seconds time elapsed ( +- 0.18% )
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: hot/cold v2 --]
[-- Type: text/x-patch, Size: 16571 bytes --]
diff --git a/src/alloc.c b/src/alloc.c
index dd783863be..21aba9e7a9 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -633,7 +633,7 @@ display_malloc_warning (void)
\f
/* Called if we can't allocate relocatable space for a buffer. */
-void
+_Cold void
buffer_memory_full (ptrdiff_t nbytes)
{
/* If buffers use the relocating allocator, no need to free
@@ -2325,7 +2325,7 @@ compact_small_strings (void)
current_sblock = tb;
}
-void
+_Cold void
string_overflow (void)
{
error ("Maximum string size exceeded");
@@ -4085,7 +4085,7 @@ set_interval_marked (INTERVAL i)
either case this counts as memory being full even though malloc did
not fail. */
-void
+_Cold void
memory_full (size_t nbytes)
{
/* Do not go into hysterics merely because a large request failed. */
diff --git a/src/bytecode.c b/src/bytecode.c
index 40977799bf..e2fe7153b0 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -336,7 +336,7 @@ bcall0 (Lisp_Object f)
ARGS are pushed on the stack according to ARGS_TEMPLATE before
executing BYTESTR. */
-Lisp_Object
+_Hot Lisp_Object
exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
Lisp_Object args_template, ptrdiff_t nargs, Lisp_Object *args)
{
diff --git a/src/data.c b/src/data.c
index 11cd598ed8..1291a92955 100644
--- a/src/data.c
+++ b/src/data.c
@@ -130,7 +130,7 @@ set_blv_valcell (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val)
blv->valcell = val;
}
-static _Noreturn void
+static _Cold _Noreturn void
wrong_length_argument (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3)
{
Lisp_Object size1 = make_fixnum (bool_vector_size (a1));
@@ -142,7 +142,7 @@ wrong_length_argument (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3)
make_fixnum (bool_vector_size (a3)));
}
-_Noreturn void
+_Cold _Noreturn void
wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value)
{
/* If VALUE is not even a valid Lisp object, we'd want to abort here
@@ -155,25 +155,25 @@ wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value)
xsignal2 (Qwrong_type_argument, predicate, value);
}
-void
+_Cold void
pure_write_error (Lisp_Object obj)
{
xsignal2 (Qerror, build_string ("Attempt to modify read-only object"), obj);
}
-void
+_Cold void
args_out_of_range (Lisp_Object a1, Lisp_Object a2)
{
xsignal2 (Qargs_out_of_range, a1, a2);
}
-void
+_Cold void
args_out_of_range_3 (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3)
{
xsignal3 (Qargs_out_of_range, a1, a2, a3);
}
-void
+_Cold void
circular_list (Lisp_Object list)
{
xsignal1 (Qcircular_list, list);
@@ -1018,7 +1018,7 @@ do_symval_forwarding (lispfwd valcontents)
/* Used to signal a user-friendly error when symbol WRONG is
not a member of CHOICE, which should be a list of symbols. */
-void
+_Cold void
wrong_choice (Lisp_Object choice, Lisp_Object wrong)
{
ptrdiff_t i = 0, len = list_length (choice);
@@ -1051,7 +1051,7 @@ wrong_choice (Lisp_Object choice, Lisp_Object wrong)
/* Used to signal a user-friendly error if WRONG is not a number or
integer/floating-point number outsize of inclusive MIN..MAX range. */
-static void
+static _Cold void
wrong_range (Lisp_Object min, Lisp_Object max, Lisp_Object wrong)
{
AUTO_STRING (value_should_be_from, "Value should be from ");
diff --git a/src/dispnew.c b/src/dispnew.c
index ccb08ec1b9..db9166cbe6 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -360,7 +360,7 @@ verify_row_hash (struct glyph_row *row)
what is displayed on the screen. While this is usually fast, it
leads to screen flickering. */
-static void
+static _Hot void
adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y, struct dim dim)
{
int i;
@@ -2994,7 +2994,7 @@ window_to_frame_hpos (struct window *w, int hpos)
/* Redraw frame F. */
-void
+_Hot void
redraw_frame (struct frame *f)
{
/* Error if F has no glyphs. */
@@ -3048,7 +3048,7 @@ DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "",
Value is true if redisplay was stopped due to pending input. */
-bool
+_Hot bool
update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p)
{
/* True means display has been paused because of pending input. */
@@ -3384,7 +3384,7 @@ check_current_matrix_flags (struct window *w)
/* Update display of window W.
If FORCE_P, don't stop updating when input is pending. */
-static bool
+static _Hot bool
update_window (struct window *w, bool force_p)
{
struct glyph_matrix *desired_matrix = w->desired_matrix;
@@ -3580,7 +3580,7 @@ update_marginal_area (struct window *w, struct glyph_row *updated_row,
/* Update the display of the text area of row VPOS in window W.
Value is true if display has changed. */
-static bool
+static _Hot bool
update_text_area (struct window *w, struct glyph_row *updated_row, int vpos)
{
struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos);
@@ -4476,7 +4476,7 @@ scrolling_window (struct window *w, bool header_line_p)
Value is true if update was stopped due to pending input. */
-static bool
+static _Hot bool
update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
bool set_cursor_p, bool updating_menu_p)
{
@@ -4779,7 +4779,7 @@ count_match (struct glyph *str1, struct glyph *end1, struct glyph *str2, struct
/* Perform a frame-based update on line VPOS in frame FRAME. */
-static void
+static _Hot void
update_frame_line (struct frame *f, int vpos, bool updating_menu_p)
{
struct glyph *obody, *nbody, *op1, *op2, *np1, *nend;
diff --git a/src/eval.c b/src/eval.c
index e9f118c5cb..eb3d856a8f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1707,25 +1707,25 @@ signal_or_quit (Lisp_Object error_symbol, Lisp_Object data, bool keyboard_quit)
/* Like xsignal, but takes 0, 1, 2, or 3 args instead of a list. */
-void
+_Cold void
xsignal0 (Lisp_Object error_symbol)
{
xsignal (error_symbol, Qnil);
}
-void
+_Cold void
xsignal1 (Lisp_Object error_symbol, Lisp_Object arg)
{
xsignal (error_symbol, list1 (arg));
}
-void
+_Cold void
xsignal2 (Lisp_Object error_symbol, Lisp_Object arg1, Lisp_Object arg2)
{
xsignal (error_symbol, list2 (arg1, arg2));
}
-void
+_Cold void
xsignal3 (Lisp_Object error_symbol, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
{
xsignal (error_symbol, list3 (arg1, arg2, arg3));
@@ -1734,7 +1734,7 @@ xsignal3 (Lisp_Object error_symbol, Lisp_Object arg1, Lisp_Object arg2, Lisp_Obj
/* Signal `error' with message S, and additional arg ARG.
If ARG is not a proper list, make it a one-element list. */
-void
+_Cold void
signal_error (const char *s, Lisp_Object arg)
{
if (NILP (Fproper_list_p (arg)))
@@ -1745,7 +1745,7 @@ signal_error (const char *s, Lisp_Object arg)
/* Use this for arithmetic overflow, e.g., when an integer result is
too large even for a bignum. */
-void
+_Cold void
overflow_error (void)
{
xsignal0 (Qoverflow_error);
@@ -1892,7 +1892,7 @@ vformat_string (const char *m, va_list ap)
}
/* Dump an error message; called like vprintf. */
-void
+_Cold void
verror (const char *m, va_list ap)
{
xsignal1 (Qerror, vformat_string (m, ap));
@@ -1902,7 +1902,7 @@ verror (const char *m, va_list ap)
/* Dump an error message; called like printf. */
/* VARARGS 1 */
-void
+_Cold void
error (const char *m, ...)
{
va_list ap;
@@ -2171,7 +2171,7 @@ record_in_backtrace (Lisp_Object function, Lisp_Object *args, ptrdiff_t nargs)
/* Eval a sub-expression of the current expression (i.e. in the same
lexical scope). */
-Lisp_Object
+_Hot Lisp_Object
eval_sub (Lisp_Object form)
{
Lisp_Object fun, val, original_fun, original_args;
@@ -2863,7 +2863,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
/* Apply a C subroutine SUBR to the NUMARGS evaluated arguments in ARG_VECTOR
and return the result of evaluation. */
-Lisp_Object
+_Hot Lisp_Object
funcall_subr (struct Lisp_Subr *subr, ptrdiff_t numargs, Lisp_Object *args)
{
if (numargs < subr->min_args
@@ -2942,7 +2942,7 @@ funcall_subr (struct Lisp_Subr *subr, ptrdiff_t numargs, Lisp_Object *args)
}
}
-static Lisp_Object
+static _Hot Lisp_Object
apply_lambda (Lisp_Object fun, Lisp_Object args, ptrdiff_t count)
{
Lisp_Object *arg_vector;
@@ -2978,7 +2978,7 @@ apply_lambda (Lisp_Object fun, Lisp_Object args, ptrdiff_t count)
FUN must be either a lambda-expression, a compiled-code object,
or a module function. */
-static Lisp_Object
+static _Hot Lisp_Object
funcall_lambda (Lisp_Object fun, ptrdiff_t nargs,
register Lisp_Object *arg_vector)
{
@@ -3322,7 +3322,7 @@ do_specbind (struct Lisp_Symbol *sym, union specbinding *bind,
i.e. bindings to the default value of a variable which can be
buffer-local. */
-void
+_Hot void
specbind (Lisp_Object symbol, Lisp_Object value)
{
struct Lisp_Symbol *sym;
@@ -3580,7 +3580,7 @@ set_unwind_protect_ptr (ptrdiff_t count, void (*func) (void *), void *arg)
/* Pop and execute entries from the unwind-protect stack until the
depth COUNT is reached. Return VALUE. */
-Lisp_Object
+_Hot Lisp_Object
unbind_to (ptrdiff_t count, Lisp_Object value)
{
Lisp_Object quitf = Vquit_flag;
diff --git a/src/keyboard.c b/src/keyboard.c
index 8fb6db987b..5569d0db2c 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1038,7 +1038,7 @@ static Lisp_Object top_level_1 (Lisp_Object);
This level has the catches for exiting/returning to editor command loop.
It returns nil to exit recursive edit, t to abort it. */
-Lisp_Object
+_Hot Lisp_Object
command_loop (void)
{
#ifdef HAVE_STACK_OVERFLOW_HANDLING
@@ -8856,7 +8856,7 @@ void init_raw_keybuf_count (void)
If FIX_CURRENT_BUFFER, we restore current_buffer
from the selected window's buffer. */
-static int
+static _Hot int
read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
bool dont_downcase_last, bool can_return_switch_frame,
bool fix_current_buffer, bool prevent_redisplay)
diff --git a/src/lisp.h b/src/lisp.h
index 681efc3b52..b98cad5e8e 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -34,6 +34,9 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <intprops.h>
#include <verify.h>
+#define _Cold __attribute__((cold))
+#define _Hot __attribute__((hot))
+
INLINE_HEADER_BEGIN
/* Define a TYPE constant ID as an externally visible name. Use like this:
@@ -621,7 +624,7 @@ extern Lisp_Object char_table_ref (Lisp_Object, int);
extern void char_table_set (Lisp_Object, int, Lisp_Object);
/* Defined in data.c. */
-extern _Noreturn void wrong_type_argument (Lisp_Object, Lisp_Object);
+extern _Cold _Noreturn void wrong_type_argument (Lisp_Object, Lisp_Object);
/* Defined in emacs.c. */
@@ -4095,18 +4098,18 @@ extern Lisp_Object run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args,
Lisp_Object (*funcall)
(ptrdiff_t nargs, Lisp_Object *args));
extern Lisp_Object quit (void);
-INLINE _Noreturn void
+INLINE _Cold _Noreturn void
xsignal (Lisp_Object error_symbol, Lisp_Object data)
{
Fsignal (error_symbol, data);
}
-extern _Noreturn void xsignal0 (Lisp_Object);
-extern _Noreturn void xsignal1 (Lisp_Object, Lisp_Object);
-extern _Noreturn void xsignal2 (Lisp_Object, Lisp_Object, Lisp_Object);
-extern _Noreturn void xsignal3 (Lisp_Object, Lisp_Object, Lisp_Object,
+extern _Cold _Noreturn void xsignal0 (Lisp_Object);
+extern _Cold _Noreturn void xsignal1 (Lisp_Object, Lisp_Object);
+extern _Cold _Noreturn void xsignal2 (Lisp_Object, Lisp_Object, Lisp_Object);
+extern _Cold _Noreturn void xsignal3 (Lisp_Object, Lisp_Object, Lisp_Object,
Lisp_Object);
-extern _Noreturn void signal_error (const char *, Lisp_Object);
-extern _Noreturn void overflow_error (void);
+extern _Cold _Noreturn void signal_error (const char *, Lisp_Object);
+extern _Cold _Noreturn void overflow_error (void);
extern bool FUNCTIONP (Lisp_Object);
extern Lisp_Object funcall_subr (struct Lisp_Subr *subr, ptrdiff_t numargs, Lisp_Object *arg_vector);
extern Lisp_Object eval_sub (Lisp_Object form);
@@ -4145,8 +4148,8 @@ extern void set_unwind_protect_ptr (ptrdiff_t, void (*) (void *), void *);
extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object);
extern void rebind_for_thread_switch (void);
extern void unbind_for_thread_switch (struct thread_state *);
-extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2);
-extern _Noreturn void verror (const char *, va_list)
+extern _Cold _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2);
+extern _Cold _Noreturn void verror (const char *, va_list)
ATTRIBUTE_FORMAT_PRINTF (1, 0);
extern Lisp_Object vformat_string (const char *, va_list)
ATTRIBUTE_FORMAT_PRINTF (1, 0);
diff --git a/src/lread.c b/src/lread.c
index 5f33fcd695..16ce4afd21 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1912,7 +1912,7 @@ readevalloop_eager_expand_eval (Lisp_Object val, Lisp_Object macroexpand)
START, END specify region to read in current buffer (from eval-region).
If the input is not from a buffer, they must be nil. */
-static void
+static _Hot void
readevalloop (Lisp_Object readcharfun,
struct infile *infile0,
Lisp_Object sourcename,
@@ -2736,7 +2736,7 @@ read_integer (Lisp_Object readcharfun, EMACS_INT radix)
FIRST_IN_LIST is true if this is the first element of a list. */
-static Lisp_Object
+static _Hot Lisp_Object
read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
{
int c;
@@ -4092,7 +4092,7 @@ check_obarray (Lisp_Object obarray)
/* Intern symbol SYM in OBARRAY using bucket INDEX. */
-static Lisp_Object
+static _Hot Lisp_Object
intern_sym (Lisp_Object sym, Lisp_Object obarray, Lisp_Object index)
{
Lisp_Object *ptr;
@@ -4116,7 +4116,7 @@ intern_sym (Lisp_Object sym, Lisp_Object obarray, Lisp_Object index)
/* Intern a symbol with name STRING in OBARRAY using bucket INDEX. */
-Lisp_Object
+_Hot Lisp_Object
intern_driver (Lisp_Object string, Lisp_Object obarray, Lisp_Object index)
{
return intern_sym (Fmake_symbol (string), obarray, index);
@@ -4125,7 +4125,7 @@ intern_driver (Lisp_Object string, Lisp_Object obarray, Lisp_Object index)
/* Intern the C string STR: return a symbol with that name,
interned in the current obarray. */
-Lisp_Object
+_Hot Lisp_Object
intern_1 (const char *str, ptrdiff_t len)
{
Lisp_Object obarray = check_obarray (Vobarray);
diff --git a/src/sysdep.c b/src/sysdep.c
index 57ea8220ca..84e118c250 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2447,7 +2447,7 @@ emacs_backtrace (int backtrace_limit)
}
\f
#ifndef HAVE_NTGUI
-void
+_Cold void
emacs_abort (void)
{
terminate_due_to_signal (SIGABRT, 40);
diff --git a/src/term.c b/src/term.c
index a492276c88..472d8d19e5 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4393,8 +4393,7 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
return terminal;
}
-
-static void
+static _Cold void
vfatal (const char *str, va_list ap)
{
fprintf (stderr, "emacs: ");
@@ -4410,7 +4409,7 @@ vfatal (const char *str, va_list ap)
Delete TERMINAL, then call error or fatal with str1 or str2,
respectively, according to whether MUST_SUCCEED is true. */
-static void
+static _Cold void
maybe_fatal (bool must_succeed, struct terminal *terminal,
const char *str1, const char *str2, ...)
{
@@ -4425,7 +4424,7 @@ maybe_fatal (bool must_succeed, struct terminal *terminal,
verror (str1, ap);
}
-void
+_Cold void
fatal (const char *str, ...)
{
va_list ap;
diff --git a/src/xdisp.c b/src/xdisp.c
index a88fc698b8..aca6f09b05 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13906,7 +13906,7 @@ do { if (polling_stopped_here) start_polling (); \
/* Perhaps in the future avoid recentering windows if it
is not necessary; currently that causes some problems. */
-static void
+static _Hot void
redisplay_internal (void)
{
struct window *w = XWINDOW (selected_window);
@@ -14925,7 +14925,7 @@ buffer_flipping_blocked_p (void)
/* Redisplay all leaf windows in the window tree rooted at WINDOW. */
-static void
+static _Hot void
redisplay_windows (Lisp_Object window)
{
while (!NILP (window))
@@ -16684,7 +16684,7 @@ set_horizontal_scroll_bar (struct window *w)
showing point will be fully (as opposed to partially) visible on
display. */
-static void
+static _Hot void
redisplay_window (Lisp_Object window, bool just_this_one_p)
{
struct window *w = XWINDOW (window);
next prev parent reply other threads:[~2019-04-16 21:11 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 0:15 Using __builtin_expect (likely/unlikely macros) Alex Gramiak
2019-04-15 1:18 ` Paul Eggert
2019-04-15 3:11 ` Alex Gramiak
2019-04-15 4:41 ` Paul Eggert
2019-04-16 0:16 ` Alex Gramiak
2019-04-16 2:34 ` Eli Zaretskii
2019-04-16 5:33 ` Alex Gramiak
2019-04-16 15:23 ` Eli Zaretskii
2019-04-16 15:47 ` Alex Gramiak
2019-04-16 3:42 ` Paul Eggert
2019-04-16 13:05 ` Stefan Monnier
2019-04-16 15:22 ` Paul Eggert
2019-04-16 16:10 ` Alex Gramiak
2019-04-16 17:54 ` Paul Eggert
2019-04-16 20:50 ` Alex Gramiak
2019-04-16 21:11 ` Alex Gramiak [this message]
2019-04-16 21:27 ` Stefan Monnier
2019-04-16 21:27 ` Konstantin Kharlamov
2019-04-18 8:25 ` Paul Eggert
2019-04-18 8:43 ` Konstantin Kharlamov
2019-04-18 13:47 ` Andy Moreton
2019-04-18 17:27 ` Paul Eggert
2019-04-18 17:56 ` Andy Moreton
2019-04-18 19:32 ` Paul Eggert
2019-04-19 13:45 ` Alex Gramiak
2019-04-19 13:58 ` Konstantin Kharlamov
2019-04-19 14:45 ` Alex Gramiak
2019-04-19 17:33 ` Paul Eggert
2019-04-19 20:53 ` Alex Gramiak
2019-04-20 0:05 ` Alan Mackenzie
2019-04-20 0:42 ` Paul Eggert
2019-04-20 19:46 ` Alan Mackenzie
2019-04-20 15:29 ` Andy Moreton
2019-04-20 15:57 ` Paul Eggert
2019-04-20 16:03 ` Eli Zaretskii
2019-04-20 16:11 ` Paul Eggert
2019-04-20 16:18 ` Eli Zaretskii
2019-04-20 16:57 ` Paul Eggert
2019-04-20 17:22 ` Eli Zaretskii
2019-04-20 19:13 ` Paul Eggert
2019-04-20 16:28 ` Óscar Fuentes
2019-04-20 18:58 ` Paul Eggert
2019-04-20 19:35 ` Óscar Fuentes
2019-04-20 22:54 ` Paul Eggert
2020-04-15 3:14 ` John Carter
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o955bqox.fsf@gmail.com \
--to=agrambot@gmail.com \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).