diff options
author | ncteisen <ncteisen@gmail.com> | 2017-03-02 15:12:33 -0800 |
---|---|---|
committer | Noah Eisen <ncteisen@google.com> | 2017-03-08 15:38:34 -0800 |
commit | 55337bb317ab22e662ffebba71078a4e8def7127 (patch) | |
tree | e3be31049e376b7b5a06e79af4d0c2946520f033 /src/core/lib/iomgr/error_internal.h | |
parent | f8a7d93a2c7a5e5ba03b1d2c3c356bbf34198463 (diff) |
Error arena optimization
Diffstat (limited to 'src/core/lib/iomgr/error_internal.h')
-rw-r--r-- | src/core/lib/iomgr/error_internal.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/core/lib/iomgr/error_internal.h b/src/core/lib/iomgr/error_internal.h index 1c89ead4ed..bdebbe1792 100644 --- a/src/core/lib/iomgr/error_internal.h +++ b/src/core/lib/iomgr/error_internal.h @@ -35,18 +35,28 @@ #define GRPC_CORE_LIB_IOMGR_ERROR_INTERNAL_H #include <inttypes.h> -#include <stdbool.h> +#include <stdbool.h> // TODO, do we need this? -#include <grpc/support/avl.h> +#include <grpc/support/sync.h> + +typedef struct linked_error linked_error; + +struct linked_error { + grpc_error *err; + uint8_t next; +}; struct grpc_error { gpr_refcount refs; - gpr_avl ints; - gpr_avl strs; - gpr_avl times; - gpr_avl errs; - uintptr_t next_err; + uint8_t ints[GRPC_ERROR_INT_MAX]; + uint8_t strs[GRPC_ERROR_STR_MAX]; + uint8_t times[GRPC_ERROR_TIME_MAX]; + uint8_t first_err; + uint8_t last_err; gpr_atm error_string; + uint8_t arena_size; + uint8_t arena_capacity; + intptr_t arena[0]; }; bool grpc_error_is_special(grpc_error *err); |