diff mbox

linux-generic: tm: parameterize use of secondary_hash_dump() routine

Message ID 1464276005-24411-1-git-send-email-bill.fischofer@linaro.org
State Accepted
Commit 3c32dd2267d768e0ddc51f3d86979854946078fc
Headers show

Commit Message

Bill Fischofer May 26, 2016, 3:20 p.m. UTC
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2177 by making use
of secondary_hash_dump() debug routine parameterized.

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 platform/linux-generic/odp_name_table.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Maxim Uvarov June 2, 2016, 12:58 p.m. UTC | #1
Merged,
Maxim.

On 05/26/16 18:20, Bill Fischofer wrote:
> Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2177 by making use
> of secondary_hash_dump() debug routine parameterized.
>
> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
> ---
>   platform/linux-generic/odp_name_table.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/platform/linux-generic/odp_name_table.c b/platform/linux-generic/odp_name_table.c
> index 801c456..14525d1 100644
> --- a/platform/linux-generic/odp_name_table.c
> +++ b/platform/linux-generic/odp_name_table.c
> @@ -47,6 +47,7 @@
>   #define NUM_NAME_TBLS  16
>   
>   #define SECONDARY_HASH_HISTO_PRINT  1
> +#define SECONDARY_HASH_DUMP         0
>   
>   typedef struct name_tbl_entry_s name_tbl_entry_t;
>   
> @@ -203,7 +204,6 @@ static void check_secondary_hash(secondary_hash_tbl_t *secondary_hash_tbl)
>   	}
>   }
>   
> -#ifdef NOT_USED /* @todo */
>   static void secondary_hash_dump(secondary_hash_tbl_t *secondary_hash_tbl)
>   {
>   	name_tbl_entry_t *name_tbl_entry;
> @@ -235,7 +235,6 @@ static void secondary_hash_dump(secondary_hash_tbl_t *secondary_hash_tbl)
>   
>   	ODP_DBG("%s count=%u\n", __func__, count);
>   }
> -#endif
>   
>   static uint32_t name_tbl_free_list_add(name_tbl_t *name_tbl,
>   				       uint32_t    num_to_add)
> @@ -486,7 +485,8 @@ static hash_tbl_entry_t secondary_hash_add(name_tbl_entry_t *name_tbl_entry,
>   		name_tbl_entry = next_entry;
>   	}
>   
> -	/* secondary_hash_dump(secondary_hash); */
> +	if (SECONDARY_HASH_DUMP)
> +		secondary_hash_dump(secondary_hash);
>   	return (hash_tbl_entry_t)(uintptr_t)secondary_hash;
>   }
>
diff mbox

Patch

diff --git a/platform/linux-generic/odp_name_table.c b/platform/linux-generic/odp_name_table.c
index 801c456..14525d1 100644
--- a/platform/linux-generic/odp_name_table.c
+++ b/platform/linux-generic/odp_name_table.c
@@ -47,6 +47,7 @@ 
 #define NUM_NAME_TBLS  16
 
 #define SECONDARY_HASH_HISTO_PRINT  1
+#define SECONDARY_HASH_DUMP         0
 
 typedef struct name_tbl_entry_s name_tbl_entry_t;
 
@@ -203,7 +204,6 @@  static void check_secondary_hash(secondary_hash_tbl_t *secondary_hash_tbl)
 	}
 }
 
-#ifdef NOT_USED /* @todo */
 static void secondary_hash_dump(secondary_hash_tbl_t *secondary_hash_tbl)
 {
 	name_tbl_entry_t *name_tbl_entry;
@@ -235,7 +235,6 @@  static void secondary_hash_dump(secondary_hash_tbl_t *secondary_hash_tbl)
 
 	ODP_DBG("%s count=%u\n", __func__, count);
 }
-#endif
 
 static uint32_t name_tbl_free_list_add(name_tbl_t *name_tbl,
 				       uint32_t    num_to_add)
@@ -486,7 +485,8 @@  static hash_tbl_entry_t secondary_hash_add(name_tbl_entry_t *name_tbl_entry,
 		name_tbl_entry = next_entry;
 	}
 
-	/* secondary_hash_dump(secondary_hash); */
+	if (SECONDARY_HASH_DUMP)
+		secondary_hash_dump(secondary_hash);
 	return (hash_tbl_entry_t)(uintptr_t)secondary_hash;
 }