diff options
author | Maxim Fedorov <maximfca@gmail.com> | 2022-01-07 10:37:03 -0800 |
---|---|---|
committer | Maxim Fedorov <maximfca@gmail.com> | 2022-01-19 09:28:16 -0800 |
commit | 69994d56e1c454134cbc83fafe673a605daffbe2 (patch) | |
tree | 114adaa583e4f7f8555d1f69af6e35e8eebf87ec /erts/include | |
parent | 41ef8097d2b6f891e5c3bd9e8084d9ffb9f7ed75 (diff) | |
download | erlang-69994d56e1c454134cbc83fafe673a605daffbe2.tar.gz |
[erts, tools] remove "emem" completely
Test suites for the tool were lost long ago. Removing "liberts.a"
library as well, for it is now empty and AR on MacOS/Windows
does not like empty libraries.
Diffstat (limited to 'erts/include')
-rw-r--r-- | erts/include/erl_memory_trace_parser.h | 157 | ||||
-rw-r--r-- | erts/include/internal/erl_memory_trace_protocol.h | 246 |
2 files changed, 0 insertions, 403 deletions
diff --git a/erts/include/erl_memory_trace_parser.h b/erts/include/erl_memory_trace_parser.h deleted file mode 100644 index 3170ebc0d0..0000000000 --- a/erts/include/erl_memory_trace_parser.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * %CopyrightBegin% - * - * Copyright Ericsson AB 2004-2016. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * %CopyrightEnd% - */ - - -/* - * Description: - * - * Author: Rickard Green - */ - -#ifndef ERL_MTRACE_PARSER_H__ -#define ERL_MTRACE_PARSER_H__ - -#include <stdlib.h> -#include "erl_fixed_size_int_types.h" - -/* emtp_parse() return values */ -#define EMTP_MIN_ERROR EMTP_NO_TRACE_ERROR - -#define EMTP_NO_TRACE_ERROR (-11) -#define EMTP_HEADER_TAG_IN_BODY_ERROR (-10) -#define EMTP_BODY_TAG_IN_HEADER_ERROR ( -9) -#define EMTP_NOT_SUPPORTED_MTRACE_VERSION_ERROR ( -8) -#define EMTP_NOT_AN_ERL_MTRACE_ERROR ( -7) -#define EMTP_NO_MEMORY_ERROR ( -6) -#define EMTP_BAD_OP_SIZE_ERROR ( -5) -#define EMTP_NO_OPERATIONS_ERROR ( -4) -#define EMTP_NOT_SUPPORTED_64_BITS_TRACE_ERROR ( -3) -#define EMTP_PARSE_ERROR ( -2) -#define EMTP_UNKNOWN_TAG_ERROR ( -1) -#define EMTP_END_OF_TRACE ( 0) -#define EMTP_END_OF_TRACE_GARBAGE_FOLLOWS ( 1) -#define EMTP_ALL_OPS_FILLED ( 2) -#define EMTP_NEED_MORE_TRACE ( 3) -#define EMTP_HEADER_PARSED ( 4) - -/* Allocator flags */ -#define EMTP_ALLOCATOR_FLAG_HAVE_USED_CARRIERS_INFO (1 << 0) - -/* Block type flags */ -/* #define EMTP_BLOCK_TYPE_FLAG_X */ - - -typedef struct { - usgnd_int_32 major; - usgnd_int_32 minor; -} emtp_version; - -typedef struct { - emtp_version parser; - emtp_version trace; -} emtp_versions; - -typedef struct { - int valid; - usgnd_int_32 flags; - char * name; - struct { - usgnd_int_16 no_providers; - usgnd_int_16 * provider; - } carrier; -} emtp_allocator; - -typedef struct { - int valid; - usgnd_int_32 flags; - char * name; - sgnd_int_32 allocator; -} emtp_block_type; - -typedef struct { - emtp_versions version; - int bits; - char * nodename; - char * hostname; - char * pid; - struct { - usgnd_int_32 year; - usgnd_int_32 month; - usgnd_int_32 day; - usgnd_int_32 hour; - usgnd_int_32 minute; - usgnd_int_32 second; - usgnd_int_32 micro_second; - } start_time; - usgnd_int_16 segment_ix; - usgnd_int_16 max_allocator_ix; - emtp_allocator ** allocator; - usgnd_int_16 max_block_type_ix; - emtp_block_type ** block_type; - int have_carrier_info; - int have_segment_carrier_info; -} emtp_info; - -typedef struct emtp_state_ emtp_state; - -enum emtp_op_type_ { - EMTP_UNDEF = 0, - EMTP_ALLOC = 1, - EMTP_REALLOC = 2, - EMTP_FREE = 3, - EMTP_CARRIER_ALLOC = 4, - EMTP_CARRIER_REALLOC = 5, - EMTP_CARRIER_FREE = 6, - EMTP_STOP = 7, - EMTP_EXIT = 8 -}; - -typedef enum emtp_op_type_ emtp_op_type; - -typedef struct { - usgnd_int_16 type; - usgnd_int_16 carrier_type; - usgnd_int_max new_ptr; - usgnd_int_max prev_ptr; - usgnd_int_max new_size; -} emtp_block_op; - -typedef struct { - emtp_op_type type; - struct { - usgnd_int_32 secs; - usgnd_int_32 usecs; - } time; - union { - emtp_block_op block; - usgnd_int_32 exit_status; - } u; -} emtp_operation; - -const char *emtp_error_string(int); -int emtp_get_info(emtp_info *ip, size_t *isz, emtp_state *sp); -emtp_state *emtp_state_new(void * (*alloc)(size_t), - void * (*realloc)(void *, size_t), - void (*free)(void *)); -void emtp_state_destroy(emtp_state *sp); -int emtp_parse(emtp_state *sp, - usgnd_int_8 **tracepp, size_t *trace_lenp, - emtp_operation *op_start, size_t op_size, size_t *op_lenp); -#endif diff --git a/erts/include/internal/erl_memory_trace_protocol.h b/erts/include/internal/erl_memory_trace_protocol.h deleted file mode 100644 index d3e0bcc1f4..0000000000 --- a/erts/include/internal/erl_memory_trace_protocol.h +++ /dev/null @@ -1,246 +0,0 @@ -/* - * %CopyrightBegin% - * - * Copyright Ericsson AB 2004-2016. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * %CopyrightEnd% - */ - - -/* - * Description: - * - * Author: Rickard Green - */ - -#ifndef ERL_MEMORY_TRACE_PROTOCOL_H__ -#define ERL_MEMORY_TRACE_PROTOCOL_H__ - -/* - * Increase ERTS_MT_MAJOR_VSN and set ERTS_MT_MINOR_VSN to 0 - * when backward incompatible changes are made in the protocol. - * - * Increase ERTS_MT_MINOR_VSN when backward compatible changes are - * made in the protocol. - */ -#define ERTS_MT_MAJOR_VSN (2) -#define ERTS_MT_MINOR_VSN (0) - -/* Trace flags */ - -#define ERTS_MT_64_BIT_FLAG (1 << 0) -#define ERTS_MT_CRR_INFO (1 << 1) -#define ERTS_MT_SEG_CRR_INFO (1 << 2) - -/* Header flags */ -/* Allocator flags */ - -#define ERTS_MT_ALLCTR_USD_CRR_INFO (1 << 0) - -/* Block type flags */ - - - -/* Entry tags */ - -#define ERTS_MT_V1_ALLOCATOR_TAG (1) -#define ERTS_MT_V1_BLOCK_TYPE_TAG (2) -#define ERTS_MT_V1_ALLOC_TAG (3) -#define ERTS_MT_V1_REALLOC_NPB_TAG (4) -#define ERTS_MT_V1_REALLOC_MV_TAG (5) -#define ERTS_MT_V1_REALLOC_NMV_TAG (6) -#define ERTS_MT_V1_FREE_TAG (7) -#define ERTS_MT_V1_TIME_INC_TAG (8) -#define ERTS_MT_V1_STOP_TAG (9) -#define ERTS_MT_V1_EXIT_TAG (10) - -#define ERTS_MT_END_OF_HDR_TAG (0) -#define ERTS_MT_ALLOCATOR_HDR_TAG (1) -#define ERTS_MT_BLOCK_TYPE_HDR_TAG (2) - -#define ERTS_MT_EXIT_BDY_TAG (0) -#define ERTS_MT_STOP_BDY_TAG (1) -#define ERTS_MT_ALLOC_BDY_TAG (2) -#define ERTS_MT_REALLOC_BDY_TAG (3) -#define ERTS_MT_FREE_BDY_TAG (4) -#define ERTS_MT_CRR_ALLOC_BDY_TAG (5) -#define ERTS_MT_CRR_REALLOC_BDY_TAG (6) -#define ERTS_MT_CRR_FREE_BDY_TAG (7) -#define ERTS_MT_TIME_INC_BDY_TAG (8) -#define ERTS_MT_X_BDY_TAG (9) - -/* X subtags */ -#if 0 -#define ERTS_MT_X_ _BDY_TAG (0) -#endif - -#define ERTS_MT_START_WORD (0xfff04711) -/* Entry header fields */ - -#define ERTS_MT_UI8_MSB_EHDR_FLD_SZ (0) -#define ERTS_MT_UI16_MSB_EHDR_FLD_SZ (1) -#define ERTS_MT_UI32_MSB_EHDR_FLD_SZ (2) -#define ERTS_MT_UI64_MSB_EHDR_FLD_SZ (3) -#define ERTS_MT_UI_MSB_EHDR_FLD_SZ ERTS_MT_UI64_MSB_EHDR_FLD_SZ -#define ERTS_MT_TAG_EHDR_FLD_SZ (4) - -#define ERTS_MT_UI8_MSB_EHDR_FLD_MSK ((1 << ERTS_MT_UI8_MSB_EHDR_FLD_SZ)-1) -#define ERTS_MT_UI16_MSB_EHDR_FLD_MSK ((1 << ERTS_MT_UI16_MSB_EHDR_FLD_SZ)-1) -#define ERTS_MT_UI32_MSB_EHDR_FLD_MSK ((1 << ERTS_MT_UI32_MSB_EHDR_FLD_SZ)-1) -#define ERTS_MT_UI64_MSB_EHDR_FLD_MSK ((1 << ERTS_MT_UI64_MSB_EHDR_FLD_SZ)-1) -#define ERTS_MT_UI_MSB_EHDR_FLD_MSK ERTS_MT_UI64_MSB_EHDR_FLD_MSK -#define ERTS_MT_TAG_EHDR_FLD_MSK ((1 << ERTS_MT_TAG_EHDR_FLD_SZ)-1) - -/* Time increment word */ -#define ERTS_MT_TIME_INC_SECS_SHIFT 20 -#define ERTS_MT_TIME_INC_USECS_SHIFT 0 - -#define ERTS_MT_TIME_INC_SECS_MASK ((1 << 12) - 1) -#define ERTS_MT_TIME_INC_USECS_MASK ((1 << 20) - 1) - - -#define ERTS_MT_MAX_V1_HEADER_ENTRY_SIZE (2 + 2 + 1 + 255 + 2) -/* Largest v1 header entry is block type entry (ERTS_MT_V1_BLOCK_TYPE_TAG) */ -#define ERTS_MT_MAX_V1_BODY_ENTRY_SIZE (2 + 8 + 8 + 8 + 4) -/* Largest body entry is realloc moved entry (ERTS_MT_V1_REALLOC_MV_TAG) */ - - -#define ERTS_MT_MAX_HEADER_ENTRY_SIZE (1 + 2 + 2 + 1 + 255 + 2) -/* Largest header entry is block type entry (ERTS_MT_BLOCK_TYPE_TAG) */ -#define ERTS_MT_MAX_BODY_ENTRY_SIZE ERTS_MT_MAX_CRR_REALLOC_SIZE -/* Largest body entry is carrier realloc entry (ERTS_MT_CRR_REALLOC_BDY_TAG) */ - -/* - * - * Entry header: - * - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * | ... |MSB2|MSB1| - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * - * Time inc entry field: - * - * 31 23 0 - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * | Seconds | Micro Seconds | - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - */ - -#define ERTS_MT_MAX_CRR_ALLOC_SIZE (1 + 2 + 2 + 2 + 8 + 8 + 4) - -/* - * ERTS_MT_CRR_ALLOC_BDY_TAG: - * N 1 2 3 4 5 - * MSB 1-0 1-0 7|3-0 7|3-0 3-0 - * SZ 1 2 2-1 2-1 8|4-1 8|4-1 4-1 - * UIT UI8 UI16 UI16 UI16 UI64|UI32 UI64|UI32 UI32 - * +---+----+...--+...--+...-------+...-------+...-------+ - * |Tag| Hdr|CType| Type| Out ptr | In size | Time inc | - * +---+----+...--+...--+...-------+...-------+...-------+ - * - */ - -#define ERTS_MT_MAX_ALLOC_SIZE (1 + 2 + 2 + 8 + 8 + 4) -/* - * ERTS_MT_ALLOC_BDY_TAG: - * N 1 2 3 4 - * MSB 1-0 7|3-0 7|3-0 3-0 - * SZ 1 2 2-1 8|4-1 8|4-1 4-1 - * UIT UI8 UI16 UI16 UI64|UI32 UI64|UI32 UI32 - * +---+----+...--+...-------+...-------+...-------+ - * |Tag| Hdr| Type| Out ptr | In size | Time inc | - * +---+----+...--+...-------+...-------+...-------+ - * - */ - -#define ERTS_MT_MAX_CRR_REALLOC_SIZE (1 + 2 + 2 + 2 + 8 + 8 + 8 + 4) -/* - * ERTS_MT_CRR_REALLOC_BDY_TAG: - * N 1 2 3 4 5 6 - * MSB 1-0 1-0 7|3-0 7|3-0 7|3-0 3-0 - * SZ 1 2 2-1 2-1 8|4-1 8|4-1 8|4-1 4-1 - * UIT UI8 UI16 UI16 UI16 UI64|UI32 UI64|UI32 UI64|UI32 UI32 - * +---+----+...--+...--+...-------+...-------+...-------+...-------+ - * |Tag| Hdr|CType| Type| Out ptr | In ptr | In size | Time inc | - * +---+----+...--+...--+...-------+...-------+...-------+...-------+ - * - */ - -#define ERTS_MT_MAX_REALLOC_SIZE (1 + 2 + 2 + 8 + 8 + 8 + 4) -/* - * ERTS_MT_REALLOC_BDY_TAG: - * N 1 2 3 4 5 - * MSB 1-0 7|3-0 7|3-0 7|3-0 3-0 - * SZ 1 2 2-1 8|4-1 8|4-1 8|4-1 4-1 - * UIT UI8 UI16 UI16 UI64|UI32 UI64|UI32 UI64|UI32 UI32 - * +---+----+...--+...-------+...-------+...-------+...-------+ - * |Tag| Hdr| Type| Out ptr | In ptr | In size | Time inc | - * +---+----+...--+...-------+...-------+...-------+...-------+ - * - */ - -#define ERTS_MT_MAX_CRR_FREE_SIZE (1 + 2 + 2 + 2 + 8 + 4) -/* - * ERTS_MT_CRR_FREE_BDY_TAG: - * N 1 2 3 4 - * MSB 1-0 1-0 7|3-0 3-0 - * SZ 1 2 2-1 2-1 8|4-1 4-1 - * UIT UI8 UI16 UI16 UI16 UI64|UI32 UI32 - * +---+----+...--+...--+...-------+...-------+ - * |Tag| Hdr|CType| Type| In ptr | Time inc | - * +---+----+...--+...--+...-------+...-------+ - * - */ - -#define ERTS_MT_MAX_FREE_SIZE (1 + 2 + 2 + 8 + 4) -/* - * ERTS_MT_FREE_BDY_TAG: - * N 1 2 3 - * MSB 1-0 7|3-0 3-0 - * SZ 1 2 2-1 8|4-1 4-1 - * UIT UI8 UI16 UI16 UI64|UI32 UI32 - * +---+----+...--+...-------+...-------+ - * |Tag| Hdr| Type| In ptr | Time inc | - * +---+----+...--+...-------+...-------+ - * - */ - -/* - * ERTS_MT_X_BDY_TAG: - * N - * MSB - * SZ 1 2 1 - * UIT UI8 UI16 UI8 - * +---+-----+------+... ...+ - * |Tag|TotSz|SubTag| | - * +---+-----+------+... ...+ - * - * ^ ^ - * | | - * +------ TotSz bytes -----+ - * - * X for extension - * - * * Tag equals ERTS_MT_X_BDY_TAG. - * * TotSz contains the total size of the entry. - * * SubTag is used to distinguish between different sub entries - * passed in X entries. - * - */ - - - -#endif /* #ifndef ERL_MEMORY_TRACE_PROTOCOL_H__ */ - |