diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-10-06 23:36:22 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-10-06 23:36:22 +0000 |
commit | 2e3bf02a1fddc09f183b5cacd76b104f620279bd (patch) | |
tree | d4f53aa07bc67569e199b3d2f14a7df058359678 /src/bytecode.c | |
parent | 78e985eb6bd7927b5b77d078bf6a4e713685bd80 (diff) | |
download | emacs-2e3bf02a1fddc09f183b5cacd76b104f620279bd.tar.gz |
(syms_of_bytecode) [BYTE_CODE_METER]: Doc fix.
(METER_CODE): Use MOST_POSITIVE_FIXNUM.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r-- | src/bytecode.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index 48739234a6d..2c4e1cca48d 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -66,16 +66,16 @@ int byte_metering_on; #define METER_1(code) METER_2 (0, (code)) -#define METER_CODE(last_code, this_code) \ -{ \ - if (byte_metering_on) \ - { \ - if (METER_1 (this_code) != ((1<<VALBITS)-1)) \ - METER_1 (this_code)++; \ - if (last_code \ - && METER_2 (last_code, this_code) != ((1<<VALBITS)-1))\ - METER_2 (last_code, this_code)++; \ - } \ +#define METER_CODE(last_code, this_code) \ +{ \ + if (byte_metering_on) \ + { \ + if (METER_1 (this_code) < MOST_POSITIVE_FIXNUM) \ + METER_1 (this_code)++; \ + if (last_code \ + && METER_2 (last_code, this_code) < MOST_POSITIVE_FIXNUM) \ + METER_2 (last_code, this_code)++; \ + } \ } #else /* no BYTE_CODE_METER */ @@ -1747,11 +1747,12 @@ syms_of_bytecode () DEFVAR_LISP ("byte-code-meter", &Vbyte_code_meter, "A vector of vectors which holds a histogram of byte-code usage.\n\ -(aref (aref byte-code-meter 0) CODE) indicates how many times the byte\n\ +\(aref (aref byte-code-meter 0) CODE) indicates how many times the byte\n\ opcode CODE has been executed.\n\ -(aref (aref byte-code-meter CODE1) CODE2), where CODE1 is not 0,\n\ +\(aref (aref byte-code-meter CODE1) CODE2), where CODE1 is not 0,\n\ indicates how many times the byte opcodes CODE1 and CODE2 have been\n\ executed in succession."); + DEFVAR_BOOL ("byte-metering-on", &byte_metering_on, "If non-nil, keep profiling information on byte code usage.\n\ The variable byte-code-meter indicates how often each byte opcode is used.\n\ |