aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/error_internal.h
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2017-03-02 15:12:33 -0800
committerGravatar Noah Eisen <ncteisen@google.com>2017-03-08 15:38:34 -0800
commit55337bb317ab22e662ffebba71078a4e8def7127 (patch)
treee3be31049e376b7b5a06e79af4d0c2946520f033 /src/core/lib/iomgr/error_internal.h
parentf8a7d93a2c7a5e5ba03b1d2c3c356bbf34198463 (diff)
Error arena optimization
Diffstat (limited to 'src/core/lib/iomgr/error_internal.h')
-rw-r--r--src/core/lib/iomgr/error_internal.h24
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);