From 9a81165830f56dde712b67627219ffb9304beac9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Wed, 19 Apr 2017 11:41:15 +0900 Subject: [PATCH] eo: Remove super bit from eo id It is not required anymore as the super class and super bit can be stored inside the object data. See the previous patches. --- src/lib/eo/eo_ptr_indirection.c | 3 +-- src/lib/eo/eo_ptr_indirection.x | 19 ++++--------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/lib/eo/eo_ptr_indirection.c b/src/lib/eo/eo_ptr_indirection.c index 86ad204666..2ef278a438 100644 --- a/src/lib/eo/eo_ptr_indirection.c +++ b/src/lib/eo/eo_ptr_indirection.c @@ -48,7 +48,7 @@ _eo_obj_pointer_invalid(const Eo_Id obj_id, file, func_name, line, "EOID %p is not a valid %s. " "EOID domain=%i, current_domain=%i, local_domain=%i. " - "EOID generation=%lx, id=%lx, ref=%i, super=%i. " + "EOID generation=%lx, id=%lx, ref=%i. " "Thread self=%s. " "Available domains [%s %s %s %s]. " "Maybe it has been deleted or does not belong to your thread?", @@ -60,7 +60,6 @@ _eo_obj_pointer_invalid(const Eo_Id obj_id, (unsigned long)(obj_id & MASK_GENERATIONS), (unsigned long)(obj_id >> SHIFT_ENTRY_ID) & (MAX_ENTRY_ID | MAX_TABLE_ID | MAX_MID_TABLE_ID), (int)(obj_id >> REF_TAG_SHIFT) & 0x1, - (int)(obj_id >> SUPER_TAG_SHIFT) & 0x1, tself, (data->tables[0]) ? "0" : " ", (data->tables[1]) ? "1" : " ", diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x index ef3c0e0cb5..fcaa7874a8 100644 --- a/src/lib/eo/eo_ptr_indirection.x +++ b/src/lib/eo/eo_ptr_indirection.x @@ -62,11 +62,10 @@ # define BITS_MID_TABLE_ID 5 # define BITS_TABLE_ID 5 # define BITS_ENTRY_ID 11 -# define BITS_GENERATION_COUNTER 6 +# define BITS_GENERATION_COUNTER 7 # define BITS_DOMAIN 2 # define BITS_CLASS 1 -# define REF_TAG_SHIFT 30 -# define SUPER_TAG_SHIFT 31 +# define REF_TAG_SHIFT 31 # define DROPPED_TABLES 0 # define DROPPED_ENTRIES 4 typedef int16_t Table_Index; @@ -76,11 +75,10 @@ typedef uint16_t Generation_Counter; # define BITS_MID_TABLE_ID 11 # define BITS_TABLE_ID 11 # define BITS_ENTRY_ID 11 -# define BITS_GENERATION_COUNTER 26 +# define BITS_GENERATION_COUNTER 27 # define BITS_DOMAIN 2 # define BITS_CLASS 1 -# define REF_TAG_SHIFT 62 -# define SUPER_TAG_SHIFT 63 +# define REF_TAG_SHIFT 63 # define DROPPED_TABLES 2 # define DROPPED_ENTRIES 3 typedef int16_t Table_Index; @@ -110,15 +108,6 @@ typedef uint32_t Generation_Counter; #define MASK_ENTRY_ID ((1 << BITS_ENTRY_ID) - 1) #define MASK_GENERATIONS (MAX_GENERATIONS - 1) #define MASK_OBJ_TAG (((Eo_Id) 1) << (REF_TAG_SHIFT)) -/* When we have EO_ID use the highest bit. - When we don't have EO_ID, we can repurpose the lowest bit, because allocation - is at least 8 byte aligned. - XXX: If this is ever not the case, we need to allocate from a mempool and ensure it, or find another trick. */ -#ifdef HAVE_EO_ID -# define MASK_SUPER_TAG (((Eo_Id) 1) << (SUPER_TAG_SHIFT)) -#else -# define MASK_SUPER_TAG ((Eo_Id) 1) -#endif /* This only applies to classes. Used to artificially enlarge the class ids * to reduce the likelihood of a clash with normal integers. */