[openib-general] [PATCH] complib: remove unused stuff

Sasha Khapyorsky sashak at voltaire.com
Mon Feb 19 15:07:57 PST 2007


This removes some unused complib stuff - cl_memory, cl_async_proc,
cl_perf.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 osm/complib/Makefile.am             |   11 +-
 osm/complib/cl_async_proc.c         |  147 --------
 osm/complib/cl_memory.c             |  515 -------------------------
 osm/complib/cl_memory_osd.c         |   93 -----
 osm/complib/cl_perf.c               |  273 --------------
 osm/complib/libosmcomp.map          |   33 --
 osm/include/Makefile.am             |    4 -
 osm/include/complib/cl_async_proc.h |  334 -----------------
 osm/include/complib/cl_memory.h     |  663 --------------------------------
 osm/include/complib/cl_memtrack.h   |   96 -----
 osm/include/complib/cl_perf.h       |  708 -----------------------------------
 11 files changed, 4 insertions(+), 2873 deletions(-)
 delete mode 100644 osm/complib/cl_async_proc.c
 delete mode 100644 osm/complib/cl_memory.c
 delete mode 100644 osm/complib/cl_memory_osd.c
 delete mode 100644 osm/complib/cl_perf.c
 delete mode 100644 osm/include/complib/cl_async_proc.h
 delete mode 100644 osm/include/complib/cl_memory.h
 delete mode 100644 osm/include/complib/cl_memtrack.h
 delete mode 100644 osm/include/complib/cl_perf.h

diff --git a/osm/complib/Makefile.am b/osm/complib/Makefile.am
index 7bdf34b..be26bb7 100644
--- a/osm/complib/Makefile.am
+++ b/osm/complib/Makefile.am
@@ -17,10 +17,10 @@ else
     libosmcomp_version_script =
 endif
 
-libosmcomp_la_SOURCES = cl_async_proc.c cl_complib.c \
+libosmcomp_la_SOURCES = cl_complib.c \
 			cl_dispatcher.c cl_event.c cl_event_wheel.c \
-			cl_list.c cl_log.c cl_map.c cl_memory.c \
-			cl_memory_osd.c cl_perf.c cl_pool.c \
+			cl_list.c cl_log.c cl_map.c \
+			cl_pool.c \
 			cl_ptr_vector.c \
 			cl_spinlock.c cl_statustext.c \
 			cl_thread.c cl_threadpool.c \
@@ -32,7 +32,7 @@ libosmcomp_la_DEPENDENCIES = $(srcdir)/libosmcomp.map
 
 libosmcompincludedir = $(includedir)/infiniband/complib
 
-libosmcompinclude_HEADERS = $(srcdir)/../include/complib/cl_async_proc.h \
+libosmcompinclude_HEADERS = \
 	$(srcdir)/../include/complib/cl_atomic.h \
 	$(srcdir)/../include/complib/cl_atomic_osd.h \
 	$(srcdir)/../include/complib/cl_byteswap.h \
@@ -49,12 +49,9 @@ libosmcompinclude_HEADERS = $(srcdir)/../include/complib/cl_async_proc.h \
 	$(srcdir)/../include/complib/cl_log.h \
 	$(srcdir)/../include/complib/cl_map.h \
 	$(srcdir)/../include/complib/cl_math.h \
-	$(srcdir)/../include/complib/cl_memory.h \
-	$(srcdir)/../include/complib/cl_memtrack.h \
 	$(srcdir)/../include/complib/cl_packoff.h \
 	$(srcdir)/../include/complib/cl_packon.h \
 	$(srcdir)/../include/complib/cl_passivelock.h \
-	$(srcdir)/../include/complib/cl_perf.h \
 	$(srcdir)/../include/complib/cl_pool.h \
 	$(srcdir)/../include/complib/cl_ptr_vector.h \
 	$(srcdir)/../include/complib/cl_qcomppool.h \
diff --git a/osm/complib/cl_async_proc.c b/osm/complib/cl_async_proc.c
deleted file mode 100644
index 7ac96bb..0000000
--- a/osm/complib/cl_async_proc.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
- * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
-
-#include <complib/cl_async_proc.h>
-
-#define CL_ASYNC_PROC_MIN	16
-#define CL_ASYNC_PROC_GROWSIZE	16
-
-/* Worker function declaration. */
-static void
-__cl_async_proc_worker(
-	IN	void* const	context );
-
-void
-cl_async_proc_construct(
-	IN	cl_async_proc_t* const	p_async_proc )
-{
-	CL_ASSERT( p_async_proc );
-
-	cl_qlist_init( &p_async_proc->item_queue );
-	cl_spinlock_construct( &p_async_proc->lock );
-}
-
-cl_status_t
-cl_async_proc_init(
-	IN	cl_async_proc_t* const	p_async_proc,
-	IN	const uint32_t			thread_count,
-	IN	const char* const		name )
-{
-	cl_status_t		status;
-
-	CL_ASSERT( p_async_proc );
-
-	cl_async_proc_construct( p_async_proc );
-
-	status = cl_spinlock_init( &p_async_proc->lock );
-	if( status != CL_SUCCESS )
-	{
-		cl_async_proc_destroy( p_async_proc );
-		return( status );
-	}
-
-	status = cl_thread_pool_init( &p_async_proc->thread_pool, thread_count,
-		__cl_async_proc_worker, p_async_proc, name );
-	if( status != CL_SUCCESS )
-		cl_async_proc_destroy( p_async_proc );
-
-	return( status );
-}
-
-void
-cl_async_proc_destroy(
-	IN	cl_async_proc_t* const	p_async_proc )
-{
-	/* Destroy the thread pool first so that the threads stop. */
-	cl_thread_pool_destroy( &p_async_proc->thread_pool );
-
-	/* Flush all queued callbacks. */
-	__cl_async_proc_worker( p_async_proc );
-
-	/* Destroy the spinlock. */
-	cl_spinlock_destroy( &p_async_proc->lock );
-}
-
-void
-cl_async_proc_queue(
-	IN	cl_async_proc_t* const		p_async_proc,
-	IN	cl_async_proc_item_t* const	p_item )
-{
-	CL_ASSERT( p_async_proc );
-	CL_ASSERT( p_item->pfn_callback );
-
-	/* Enqueue this item for processing. */
-	cl_spinlock_acquire( &p_async_proc->lock );
-	cl_qlist_insert_tail( &p_async_proc->item_queue,
-		&p_item->pool_item.list_item );
-	cl_spinlock_release( &p_async_proc->lock );
-
-	/* Signal the thread pool to wake up. */
-	cl_thread_pool_signal( &p_async_proc->thread_pool );
-}
-
-static void
-__cl_async_proc_worker(
-	IN	void* const	context)
-{
-	cl_async_proc_t			*p_async_proc = (cl_async_proc_t*)context;
-	cl_list_item_t			*p_list_item;
-	cl_async_proc_item_t	*p_item;
-
-	/* Process items from the head of the queue until it is empty. */
-	cl_spinlock_acquire( &p_async_proc->lock );
-	p_list_item = cl_qlist_remove_head( &p_async_proc->item_queue );
-	while( p_list_item != cl_qlist_end( &p_async_proc->item_queue ) )
-	{
-		/* Release the lock during the user's callback. */
-		cl_spinlock_release( &p_async_proc->lock );
-
-		/* Invoke the user callback. */
-		p_item = (cl_async_proc_item_t*)p_list_item;
-		p_item->pfn_callback( p_item );
-
-		/* Acquire the lock again to continue processing. */
-		cl_spinlock_acquire( &p_async_proc->lock );
-		/* Get the next item in the queue. */
-		p_list_item = cl_qlist_remove_head( &p_async_proc->item_queue );
-	}
-
-	/* The queue is empty.  Release the lock and return. */
-	cl_spinlock_release( &p_async_proc->lock );
-}
diff --git a/osm/complib/cl_memory.c b/osm/complib/cl_memory.c
deleted file mode 100644
index daf7fe1..0000000
--- a/osm/complib/cl_memory.c
+++ /dev/null
@@ -1,515 +0,0 @@
-/*
- * Copyright (c) 2004-2006 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
- * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-/*
- * Abstract:
- *	Implementation of memory allocation tracking functions.
- *
- * Environment:
- *	All
- *
- * $Revision: 1.4 $
- */
-
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
-
-#include <string.h>
-#include <complib/cl_memtrack.h>
-#define  _MEM_DEBUG_MODE_ 0
-#ifdef _MEM_DEBUG_MODE_
-/* 
-   In the mem debug mode we will be wrapping up the allocated buffer
-   with magic constants and the required size and then check during free.
-   
-   The memory layout will be:
-   |<magic start>|<req size>|<buffer ....>|<magic end>|
-   
-*/
-
-#define _MEM_DEBUG_MAGIC_SIZE_  4
-#define _MEM_DEBUG_EXTRA_SIZE_  sizeof(size) + 8
-static uint8_t _MEM_DEBUG_MAGIC_START_[4] = {0x12, 0x34, 0x56, 0x78, };
-static uint8_t _MEM_DEBUG_MAGIC_END_[4] =   {0x87, 0x65, 0x43, 0x21, };
-#endif
-
-cl_mem_tracker_t		*gp_mem_tracker = NULL;
-
-/*
- * Allocates memory.
- */
-void*
-__cl_malloc_priv(
-	IN	const size_t	size );
-
-/*
- * Deallocates memory.
- */
-void
-__cl_free_priv(
-	IN	void* const	p_memory );
-
-/*
- * Allocate and initialize the memory tracker object.
- */
-static inline void
-__cl_mem_track_start( void )
-{
-	cl_status_t			status;
-
-	if( gp_mem_tracker )
-		return;
-
-	/* Allocate the memory tracker object. */
-	gp_mem_tracker = (cl_mem_tracker_t*)
-		__cl_malloc_priv( sizeof(cl_mem_tracker_t) );
-
-	if( !gp_mem_tracker )
-		return;
-
-	/* Initialize the free list. */
-	cl_qlist_init( &gp_mem_tracker->free_hdr_list );
-	/* Initialize the allocation list. */
-	cl_qlist_init( &gp_mem_tracker->alloc_list );
-
-	/* Initialize the spin lock to protect list operations. */
-	status = cl_spinlock_init( &gp_mem_tracker->lock );
-	if( status != CL_SUCCESS )
-	{
-		__cl_free_priv( gp_mem_tracker );
-		return;
-	}
-
-	cl_msg_out( "\n\n\n*** Memory tracker object address = %p ***\n\n\n",
-		gp_mem_tracker );
-}
-
-/*
- * Clean up memory tracking.
- */
-static inline void
-__cl_mem_track_stop( void )
-{
-	cl_list_item_t	*p_list_item;
-
-	if( !gp_mem_tracker )
-		return;
-
-	if( !cl_is_qlist_empty( &gp_mem_tracker->alloc_list ) )
-	{
-		/* There are still items in the list.  Print them out. */
-		cl_mem_display();
-	}
-
-	/* Free all allocated headers. */
-	cl_spinlock_acquire( &gp_mem_tracker->lock );
-	while( !cl_is_qlist_empty( &gp_mem_tracker->alloc_list ) )
-	{
-		p_list_item = cl_qlist_remove_head( &gp_mem_tracker->alloc_list );
-		__cl_free_priv(
-			PARENT_STRUCT( p_list_item, cl_malloc_hdr_t, list_item ) );
-	}
-
-	while( !cl_is_qlist_empty( &gp_mem_tracker->free_hdr_list ) )
-	{
-		p_list_item = cl_qlist_remove_head( &gp_mem_tracker->free_hdr_list );
-		__cl_free_priv(
-			PARENT_STRUCT( p_list_item, cl_malloc_hdr_t, list_item ) );
-	}
-	cl_spinlock_release( &gp_mem_tracker->lock );
-
-	/* Destory all objects in the memory tracker object. */
-	cl_spinlock_destroy( &gp_mem_tracker->lock );
-
-	/* Free the memory allocated for the memory tracker object. */
-	__cl_free_priv( gp_mem_tracker );
-}
-
-/*
- * Enables memory allocation tracking.
- */
-void
-__cl_mem_track(
-	IN	const boolean_t	start )
-{
-	if( start )
-		__cl_mem_track_start();
-	else
-		__cl_mem_track_stop();
-}
-
-/*
- * Display memory usage.
- */
-void
-cl_mem_display( void )
-{
-	cl_list_item_t		*p_list_item;
-	cl_malloc_hdr_t		*p_hdr;
-
-	if( !gp_mem_tracker )
-		return;
-
-	cl_spinlock_acquire( &gp_mem_tracker->lock );
-	cl_msg_out( "\n\n\n*** Memory Usage ***\n" );
-	p_list_item = cl_qlist_head( &gp_mem_tracker->alloc_list );
-	while( p_list_item != cl_qlist_end( &gp_mem_tracker->alloc_list ) )
-	{
-		/*
-		 * Get the pointer to the header.  Note that the object member of the
-		 * list item will be used to store the pointer to the user's memory.
-		 */
-		p_hdr = PARENT_STRUCT( p_list_item, cl_malloc_hdr_t, list_item );
-
-		cl_msg_out( "\tMemory block at %p allocated in file %s line %d\n",
-			p_hdr->p_mem, p_hdr->file_name, p_hdr->line_num );
-
-		p_list_item = cl_qlist_next( p_list_item );
-	}
-	cl_msg_out( "*** End of Memory Usage ***\n\n" );
-	cl_spinlock_release( &gp_mem_tracker->lock );
-}
-
-/*
- * Check the memory using the magic bits to see if anything corrupted
- * our memory.
- */
-boolean_t
-cl_mem_check( void )
-{
-   boolean_t res = TRUE;
-
-#ifdef _MEM_DEBUG_MODE_
-   {
- 	cl_list_item_t		*p_list_item;
-	cl_malloc_hdr_t		*p_hdr;
-   size_t size;
-   void *p_mem;
-
-	if( !gp_mem_tracker )
-		return res;
-
-	cl_spinlock_acquire( &gp_mem_tracker->lock );
-   /*	cl_msg_out( "\n\n\n*** Memory Checker ***\n" ); */
-	p_list_item = cl_qlist_head( &gp_mem_tracker->alloc_list );
-	while( p_list_item != cl_qlist_end( &gp_mem_tracker->alloc_list ) )
-	{
-     /*
-      * Get the pointer to the header.  Note that the object member of the
-      * list item will be used to store the pointer to the user's memory.
-      */
-     p_hdr = PARENT_STRUCT( p_list_item, cl_malloc_hdr_t, list_item );
-     
-     /*     cl_msg_out( "\tMemory block at %p allocated in file %s line %d\n",
-            p_hdr->p_mem, p_hdr->file_name, p_hdr->line_num ); */
-     
-     /* calc the start */
-     p_mem = (char*)p_hdr->p_mem - sizeof(size) - _MEM_DEBUG_MAGIC_SIZE_;
-     /* check the header magic: */
-     if (memcmp(p_mem, &_MEM_DEBUG_MAGIC_START_, _MEM_DEBUG_MAGIC_SIZE_))
-     {
-       cl_msg_out("\n *** cl_mem_check ERROR: BAD Magic Start in free of memory:%p file:%s line:%d\n", 
-                  p_hdr->p_mem , p_hdr->file_name, p_hdr->line_num
-                  );
-       res = FALSE;
-     }
-     else 
-     {
-       /* obtain the size from the header */
-       memcpy(&size, (char*)p_mem + _MEM_DEBUG_MAGIC_SIZE_, sizeof(size));
-       
-       if (memcmp((char*)p_mem + sizeof(size) + _MEM_DEBUG_MAGIC_SIZE_ + size, 
-                  &_MEM_DEBUG_MAGIC_END_, _MEM_DEBUG_MAGIC_SIZE_))
-       {
-         cl_msg_out("\n *** cl_mem_check ERROR: BAD Magic End in free of memory:%p file:%s line:%d\n", 
-                    p_hdr->p_mem , p_hdr->file_name, p_hdr->line_num
-                    );
-         res = FALSE;
-       }
-     }
-
-     p_list_item = cl_qlist_next( p_list_item );
-	}
-   /*	cl_msg_out( "*** End of Memory Checker ***\n\n" ); */
-	cl_spinlock_release( &gp_mem_tracker->lock );
-   }
-#endif
-   return res;
-}
-
-/*
- * Allocates memory and stores information about the allocation in a list.
- * The contents of the list can be printed out by calling the function
- * "MemoryReportUsage".  Memory allocation will succeed even if the list
- * cannot be created.
- */
-void*
-__cl_malloc_trk(
-	IN	const char* const	p_file_name,
-	IN	const int32_t		line_num,
-	IN	const size_t		size )
-{
-	cl_malloc_hdr_t	*p_hdr;
-	cl_list_item_t	*p_list_item;
-	void			*p_mem;
-	char			temp_buf[FILE_NAME_LENGTH];
-	int32_t			temp_line;
-
-#ifdef _MEM_DEBUG_MODE_
-      /* If we are running in MEM_DEBUG_MODE then 
-         the cl_mem_check will be called on every run */
-      if (cl_mem_check() == FALSE) 
-      {
-        cl_msg_out( "*** MEMORY ERROR !!! ***\n" );
-        CL_ASSERT(0);
-      }
-#endif
-
-	/*
-	 * Allocate the memory first, so that we give the user's allocation
-	 * priority over the the header allocation.
-	 */
-#ifndef _MEM_DEBUG_MODE_
-   p_mem = __cl_malloc_priv( size );
-	if( !p_mem )
-		return( NULL );
-#else
-   p_mem = __cl_malloc_priv( size + sizeof(size) + 32 );
-	if( !p_mem )
-		return( NULL );
-   /* now poisen */
-   memset(p_mem, 0xA5, size + _MEM_DEBUG_EXTRA_SIZE_);
-   /* special layout */
-   memcpy(p_mem, &_MEM_DEBUG_MAGIC_START_, _MEM_DEBUG_MAGIC_SIZE_);
-   memcpy((char*)p_mem + _MEM_DEBUG_MAGIC_SIZE_, &size, sizeof(size));
-   memcpy((char*)p_mem + sizeof(size) + size + _MEM_DEBUG_MAGIC_SIZE_,
-          &_MEM_DEBUG_MAGIC_END_, _MEM_DEBUG_MAGIC_SIZE_);
-   p_mem = (char*)p_mem +  _MEM_DEBUG_MAGIC_SIZE_ + sizeof(size);
-#endif
-
-	if( !gp_mem_tracker )
-		return( p_mem );
-
-	/*
-	 * Make copies of the file name and line number in case those
-	 * parameters are in paged pool.
-	 */
-	temp_line = line_num;
-	strncpy( temp_buf, p_file_name, FILE_NAME_LENGTH );
-	/* Make sure the string is null terminated. */
-	temp_buf[FILE_NAME_LENGTH - 1] = '\0';
-
-	cl_spinlock_acquire( &gp_mem_tracker->lock );
-
-	/* Get a header from the free header list. */
-	p_list_item = cl_qlist_remove_head( &gp_mem_tracker->free_hdr_list );
-	if( p_list_item != cl_qlist_end( &gp_mem_tracker->free_hdr_list ) )
-	{
-		/* Set the header pointer to the header retrieved from the list. */
-		p_hdr = PARENT_STRUCT( p_list_item, cl_malloc_hdr_t, list_item );
-	}
-	else
-	{
-		/* We failed to get a free header.  Allocate one. */
-		p_hdr = __cl_malloc_priv( sizeof(cl_malloc_hdr_t) );
-		if( !p_hdr )
-		{
-			/* We failed to allocate the header.  Return the user's memory. */
-			cl_spinlock_release( &gp_mem_tracker->lock );
-			return( p_mem );
-		}
-	}
-	memcpy( p_hdr->file_name, temp_buf, FILE_NAME_LENGTH );
-	p_hdr->line_num = temp_line;
-	/*
-	 * We store the pointer to the memory returned to the user.  This allows
-	 * searching the list of allocated memory even if the buffer allocated is
-	 * not in the list without dereferencing memory we do not own.
-	 */
-	p_hdr->p_mem = p_mem;
-
-	/* Insert the header structure into our allocation list. */
-	cl_qlist_insert_tail( &gp_mem_tracker->alloc_list, &p_hdr->list_item );
-	cl_spinlock_release( &gp_mem_tracker->lock );
-
-	return( p_mem );
-}
-
-/*
- * Allocate non-tracked memory.
- */
-void*
-__cl_malloc_ntrk(
-	IN	const size_t	size )
-{
-	return( __cl_malloc_priv( size ) );
-}
-
-void*
-__cl_zalloc_trk(
-	IN	const char* const	p_file_name,
-	IN	const int32_t		line_num,
-	IN	const size_t		size )
-{
-	void	*p_buffer;
-
-	p_buffer = __cl_malloc_trk( p_file_name, line_num, size );
-	if( p_buffer )
-		memset( p_buffer, 0, size );
-
-	return( p_buffer );
-}
-
-void*
-__cl_zalloc_ntrk(
-	IN	const size_t	size )
-{
-	void	*p_buffer;
-
-	p_buffer = __cl_malloc_priv( size );
-	if( p_buffer )
-		memset( p_buffer, 0, size );
-
-	return( p_buffer );
-}
-
-static cl_status_t
-__cl_find_mem(
-	IN	const cl_list_item_t* const p_list_item,
-	IN	void* const					p_memory )
-{
-	cl_malloc_hdr_t		*p_hdr;
-
-	/* Get the pointer to the header. */
-	p_hdr = PARENT_STRUCT( p_list_item, cl_malloc_hdr_t, list_item );
-
-	if( p_memory == p_hdr->p_mem )
-		return( CL_SUCCESS );
-
-	return( CL_NOT_FOUND );
-}
-
-void
-__cl_free_trk(
-  IN	const char* const	p_file_name,
-  IN	const int32_t		line_num,  
-  IN	void* const	      p_memory )
-{
-	cl_malloc_hdr_t		*p_hdr;
-	cl_list_item_t		*p_list_item;
-
-#ifdef _MEM_DEBUG_MODE_
-      /* If we are running in MEM_DEBUG_MODE then 
-         the cl_mem_check will be called on every run */
-      if (cl_mem_check() == FALSE) 
-      {
-        cl_msg_out( "*** MEMORY ERROR !!! ***\n" );
-        CL_ASSERT(0);
-      }
-#endif
-
-	if( gp_mem_tracker )
-	{
-		cl_spinlock_acquire( &gp_mem_tracker->lock );
-
-		/*
-		 * Removes an item from the allocation tracking list given a pointer
-		 * To the user's data and returns the pointer to header referencing the
-		 * allocated memory block.
-		 */
-		p_list_item = cl_qlist_find_from_tail( &gp_mem_tracker->alloc_list,
-			__cl_find_mem, p_memory );
-
-		if( p_list_item != cl_qlist_end(&gp_mem_tracker->alloc_list) )
-		{
-			/* Get the pointer to the header. */
-			p_hdr = PARENT_STRUCT( p_list_item, cl_malloc_hdr_t, list_item );
-			/* Remove the item from the list. */
-			cl_qlist_remove_item( &gp_mem_tracker->alloc_list, p_list_item );
-
-			/* Return the header to the free header list. */
-			cl_qlist_insert_head( &gp_mem_tracker->free_hdr_list,
-				&p_hdr->list_item );
-		} else {
-        	cl_msg_out("\n *** cl_free ERROR: free of non tracked memory:%p file:%s line:%d\n", 
-                    p_memory , p_file_name, line_num
-                    );
-      }
-		cl_spinlock_release( &gp_mem_tracker->lock );
-	}
-
-#ifdef _MEM_DEBUG_MODE_
-   {
-     size_t size;
-     void *p_mem;
-
-     /* calc the start */
-     p_mem = (char*)p_memory - sizeof(size) - _MEM_DEBUG_MAGIC_SIZE_;
-     /* check the header magic: */
-     if (memcmp(p_mem, &_MEM_DEBUG_MAGIC_START_, _MEM_DEBUG_MAGIC_SIZE_))
-     {
-       cl_msg_out("\n *** cl_free ERROR: BAD Magic Start in free of memory:%p file:%s line:%d\n", 
-                  p_memory , p_file_name, line_num
-                  );
-     } 
-     else 
-     {
-       /* obtain the size from the header */
-       memcpy(&size, (char*)p_mem + _MEM_DEBUG_MAGIC_SIZE_, sizeof(size));
-       
-       if (memcmp((char*)p_mem + sizeof(size) + _MEM_DEBUG_MAGIC_SIZE_ + size, 
-                  &_MEM_DEBUG_MAGIC_END_, _MEM_DEBUG_MAGIC_SIZE_))
-       {
-         cl_msg_out("\n *** cl_free ERROR: BAD Magic End in free of memory:%p file:%s line:%d\n", 
-                    p_memory , p_file_name, line_num
-                    );
-       }
-       /* now poisen */
-       memset(p_mem, 0x5A, size + _MEM_DEBUG_EXTRA_SIZE_);
-     }
-     __cl_free_priv( p_mem );
-   }
-#else
-	__cl_free_priv( p_memory );
-#endif
-}
-
-void
-__cl_free_ntrk(
-	IN	void* const	p_memory )
-{
-	__cl_free_priv( p_memory );
-}
diff --git a/osm/complib/cl_memory_osd.c b/osm/complib/cl_memory_osd.c
deleted file mode 100644
index ac2658b..0000000
--- a/osm/complib/cl_memory_osd.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2004-2006 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
- * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-/*
- * Abstract:
- *	Implementation of memory manipulation functions for Linux user mode.
- *
- * Environment:
- *	Linux User Mode
- *
- * $Revision: 1.3 $
- */
-
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
-
-#include <complib/cl_memory.h>
-#include <stdlib.h>
-
-void*
-__cl_malloc_priv(
-	IN	const size_t	size )
-{
-	return malloc( size );
-}
-
-void
-__cl_free_priv(
-	IN	void* const	p_memory )
-{
-	free( p_memory );
-}
-
-void
-cl_memset(
-	IN	void* const		p_memory,
-	IN	const uint8_t	fill,
-	IN	const size_t	count )
-{
-	memset( p_memory, fill, count );
-}
-
-void*
-cl_memcpy(
-	IN	void* const			p_dest,
-	IN	const void* const	p_src,
-	IN	const size_t		count )
-{
-	return( memcpy( p_dest, p_src, count ) );
-}
-
-int32_t
-cl_memcmp(
-	IN	const void* const	p_mem,
-	IN	const void* const	p_ref,
-	IN	const size_t		count )
-{
-	return( memcmp( p_mem, p_ref, count ) );
-}
-
diff --git a/osm/complib/cl_perf.c b/osm/complib/cl_perf.c
deleted file mode 100644
index 9450bb1..0000000
--- a/osm/complib/cl_perf.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright (c) 2004-2006 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
- * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-/*
- * Abstract:
- *	Implementation of performance tracking.
- *
- * Environment:
- *	All supported environments.
- *
- * $Revision: 1.3 $
- */
-
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
-
-#include <stdlib.h>
-#include <string.h>
-
-/*
- * Always turn on performance tracking when building this file to allow the
- * performance counter functions to be built into the component library.
- * Users control their use of the functions by defining the PERF_TRACK_ON
- * keyword themselves before including cl_perf.h to enable the macros to
- * resolve to the internal functions.
- */
-#define PERF_TRACK_ON
-
-#include <complib/cl_perf.h>
-#include <complib/cl_debug.h>
-
-uint64_t
-__cl_perf_run_calibration(
-	IN	cl_perf_t* const p_perf );
-
-/*
- * Initialize the state of the performance tracker.
- */
-void
-__cl_perf_construct(
-	IN	cl_perf_t* const	p_perf )
-{
-	memset( p_perf, 0, sizeof(cl_perf_t) );
-	p_perf->state = CL_UNINITIALIZED;
-}
-
-/*
- * Initialize the performance tracker.
- */
-cl_status_t
-__cl_perf_init(
-	IN	cl_perf_t* const	p_perf,
-	IN	const uintn_t		num_counters )
-{
-	cl_status_t		status;
-	cl_spinlock_t	lock;
-	uintn_t			i;
-	static uint64_t	locked_calibration_time = 0;
-	static uint64_t	normal_calibration_time;
-
-	CL_ASSERT( p_perf );
-	CL_ASSERT( !p_perf->size && num_counters );
-
-	/* Construct the performance tracker. */
-	__cl_perf_construct( p_perf );
-
-	/* Allocate an array of counters. */
-	p_perf->size = num_counters;
-	p_perf->data_array = (cl_perf_data_t*)
-		malloc( sizeof(cl_perf_data_t) * num_counters );
-
-	if( !p_perf->data_array )
-		return( CL_INSUFFICIENT_MEMORY );
-	else
-		memset( p_perf->data_array, 0,
-			sizeof(cl_perf_data_t) * num_counters );
-
-	/* Initialize the user's counters. */
-	for( i = 0; i < num_counters; i++ )
-	{
-		p_perf->data_array[i].min_time = ((uint64_t)~0);
-		cl_spinlock_construct( &p_perf->data_array[i].lock );
-	}
-
-	for( i = 0; i < num_counters; i++ )
-	{
-		status = cl_spinlock_init( &p_perf->data_array[i].lock );
-		if( status != CL_SUCCESS )
-		{
-			__cl_perf_destroy( p_perf, FALSE );
-			return( status );
-		}
-	}
-
-	/*
-	 * Run the calibration only if it has not been run yet.  Subsequent
-	 * calls will use the results from the first calibration.
-	 */
-	if( !locked_calibration_time )
-	{
-		/*
-		 * Perform the calibration under lock to prevent thread context
-		 * switches.
-		 */
-		cl_spinlock_construct( &lock );
-		status = cl_spinlock_init( &lock );
-		if( status != CL_SUCCESS )
-		{
-			__cl_perf_destroy( p_perf, FALSE );
-			return( status );
-		}
-
-		/* Measure the impact when running at elevated thread priority. */
-		cl_spinlock_acquire( &lock );
-		locked_calibration_time = __cl_perf_run_calibration( p_perf );
-		cl_spinlock_release( &lock );
-		cl_spinlock_destroy( &lock );
-
-		/* Measure the impact when runnin at normal thread priority. */
-		normal_calibration_time = __cl_perf_run_calibration( p_perf );
-	}
-
-	/* Reset the user's performance counter. */
-	p_perf->normal_calibration_time = locked_calibration_time;
-	p_perf->locked_calibration_time = normal_calibration_time;
-	p_perf->data_array[0].count = 0;
-	p_perf->data_array[0].total_time = 0;
-	p_perf->data_array[0].min_time = ((uint64_t)~0);
-
-	p_perf->state = CL_INITIALIZED;
-
-	return( CL_SUCCESS );
-}
-
-/*
- * Measure the time to take performance counters.
- */
-uint64_t
-__cl_perf_run_calibration(
-	IN	cl_perf_t* const	p_perf )
-{
-	uint64_t		start_time;
-	uintn_t			i;
-	PERF_DECLARE( 0 );
-
-	/* Start timing. */
-	start_time = cl_get_time_stamp();
-
-	/*
-	 * Get the performance counter repeatedly in a loop.  Use the first
-	 * user counter as our test counter.
-	 */
-	for( i = 0; i < PERF_CALIBRATION_TESTS; i++ )
-	{
-		cl_perf_start( 0 );
-		cl_perf_stop( p_perf, 0 );
-	}
-
-	/* Calculate the total time for the calibration. */
-	return( cl_get_time_stamp() - start_time );
-}
-
-/*
- * Destroy the performance tracker.
- */
-void
-__cl_perf_destroy(
-	IN	cl_perf_t* const	p_perf,
-	IN	const boolean_t		display )
-{
-	uintn_t	i;
-
-	CL_ASSERT( cl_is_state_valid( p_perf->state ) );
-
-	if( !p_perf->data_array )
-		return;
-
-	/* Display the performance data as requested. */
-	if( display && p_perf->state == CL_INITIALIZED )
-		__cl_perf_display( p_perf );
-
-	/* Destroy the user's counters. */
-	for( i = 0; i < p_perf->size; i++ )
-		cl_spinlock_destroy( &p_perf->data_array[i].lock );
-
-	free( p_perf->data_array );
-	p_perf->data_array = NULL;
-
-	p_perf->state = CL_UNINITIALIZED;
-}
-
-/*
- * Reset the performance counters.
- */
-void
-__cl_perf_reset(
-	IN	cl_perf_t* const		p_perf )
-{
-	uintn_t	i;
-
-	for( i = 0; i < p_perf->size; i++ )
-	{
-		cl_spinlock_acquire( &p_perf->data_array[i].lock );
-		p_perf->data_array[i].min_time = ((uint64_t)~0);
-		p_perf->data_array[i].total_time = 0;
-		p_perf->data_array[i].count = 0;
-		cl_spinlock_release( &p_perf->data_array[i].lock );
-	}
-}
-
-/*
- * Display the captured performance data.
- */
-void
-__cl_perf_display(
-	IN	const cl_perf_t* const	p_perf )
-{
-	uintn_t	i;
-
-	CL_ASSERT( p_perf );
-	CL_ASSERT( p_perf->state == CL_INITIALIZED );
-
-	cl_msg_out( "\n\n\nCL Perf:\tPerformance Data\n" );
-
-	cl_msg_out( "CL Perf:\tCounter Calibration Time\n" );
-	cl_msg_out( "CL Perf:\tLocked TotalTime\tNormal TotalTime\tTest Count\n" );
-	cl_msg_out( "CL Perf:\t%"PRIu64"\t%"PRIu64"\t%u\n",
-		p_perf->locked_calibration_time, p_perf->normal_calibration_time,
-		PERF_CALIBRATION_TESTS );
-
-	cl_msg_out( "CL Perf:\tUser Performance Counters\n" );
-	cl_msg_out( "CL Perf:\tIndex\tTotalTime\tMinTime\tCount\n" );
-	for( i = 0; i < p_perf->size; i++ )
-	{
-		cl_msg_out( "CL Perf:\t%lu\t%"PRIu64"\t%"PRIu64"\t%"PRIu64"\n",
-			i, p_perf->data_array[i].total_time,
-			p_perf->data_array[i].min_time, p_perf->data_array[i].count );
-	}
-	cl_msg_out( "CL Perf:\tEnd of User Performance Counters\n" );
-}
diff --git a/osm/complib/libosmcomp.map b/osm/complib/libosmcomp.map
index 3b8c040..9d9588b 100644
--- a/osm/complib/libosmcomp.map
+++ b/osm/complib/libosmcomp.map
@@ -1,9 +1,5 @@
 OSMCOMP_1.1 {
 	global:
-		cl_async_proc_construct;
-		cl_async_proc_init;
-		cl_async_proc_destroy;
-		cl_async_proc_queue;
 		complib_init;
 		complib_exit;
 		cl_is_debug;
@@ -75,28 +71,6 @@ OSMCOMP_1.1 {
 		cl_fmap_remove;
 		cl_fmap_merge;
 		cl_fmap_delta;
-		__cl_malloc_priv;
-		__cl_free_priv;
-		__cl_mem_track;
-		cl_mem_display;
-		cl_mem_check;
-		__cl_malloc_trk;
-		__cl_malloc_ntrk;
-		__cl_zalloc_trk;
-		__cl_zalloc_ntrk;
-		__cl_find_mem;
-		__cl_free_trk;
-		__cl_free_ntrk;
-		cl_memset;
-		cl_memcpy;
-		cl_memcmp;
-		__cl_perf_run_calibration;
-		__cl_perf_construct;
-		__cl_perf_init;
-		__cl_perf_run_calibration;
-		__cl_perf_destroy;
-		__cl_perf_reset;
-		__cl_perf_display;
 		cl_qcpool_construct;
 		cl_qcpool_init;
 		cl_qcpool_destroy;
@@ -171,13 +145,6 @@ OSMCOMP_1.1 {
 		cl_vector_find_from_end;
 		cl_atomic_spinlock;
 		cl_atomic_dec;
-		cl_free;
-		cl_malloc;
-		cl_perf_construct;
-		cl_perf_destroy;
-		cl_perf_display;
-		cl_perf_init;
-		cl_perf_reset;
 		cl_zalloc;
 		ib_error_str;
 		ib_async_event_str;
diff --git a/osm/include/Makefile.am b/osm/include/Makefile.am
index 5efc11a..cf1b0e7 100644
--- a/osm/include/Makefile.am
+++ b/osm/include/Makefile.am
@@ -105,7 +105,6 @@ EXTRA_DIST = \
 	$(srcdir)/complib/cl_qlockpool.h \
 	$(srcdir)/complib/cl_event_wheel.h \
 	$(srcdir)/complib/cl_thread.h \
-	$(srcdir)/complib/cl_memory.h \
 	$(srcdir)/complib/cl_packoff.h \
 	$(srcdir)/complib/cl_pool.h \
 	$(srcdir)/complib/cl_types_osd.h \
@@ -118,12 +117,9 @@ EXTRA_DIST = \
 	$(srcdir)/complib/cl_dispatcher.h \
 	$(srcdir)/complib/cl_spinlock_osd.h \
 	$(srcdir)/complib/cl_debug_osd.h \
-	$(srcdir)/complib/cl_perf.h \
 	$(srcdir)/complib/cl_qmap.h \
 	$(srcdir)/complib/cl_byteswap.h \
-	$(srcdir)/complib/cl_async_proc.h \
 	$(srcdir)/complib/cl_threadpool.h \
-	$(srcdir)/complib/cl_memtrack.h \
 	$(srcdir)/complib/cl_types.h \
 	$(srcdir)/complib/cl_fleximap.h \
 	$(srcdir)/complib/cl_qcomppool.h \
diff --git a/osm/include/complib/cl_async_proc.h b/osm/include/complib/cl_async_proc.h
deleted file mode 100644
index 8d6a71f..0000000
--- a/osm/include/complib/cl_async_proc.h
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
- * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-/*
- * Abstract:
- *	Declaration of the asynchronous processing module.
- *
- * Environment:
- *	All
- *
- * $Revision: 1.3 $
- */
-
-#ifndef _CL_ASYNC_PROC_H_
-#define _CL_ASYNC_PROC_H_
-
-#include <complib/cl_qlist.h>
-#include <complib/cl_qpool.h>
-#include <complib/cl_threadpool.h>
-#include <complib/cl_spinlock.h>
-
-#ifdef __cplusplus
-#  define BEGIN_C_DECLS extern "C" {
-#  define END_C_DECLS   }
-#else /* !__cplusplus */
-#  define BEGIN_C_DECLS
-#  define END_C_DECLS
-#endif /* __cplusplus */
-
-BEGIN_C_DECLS
-
-/****h* Component Library/Asynchronous Processor
-* NAME
-*	Asynchronous Processor
-*
-* DESCRIPTION
-*	The asynchronous processor provides threads for executing queued callbacks.
-*
-*	The threads in the asynchronous processor wait for callbacks to be queued.
-*
-*	The asynchronous processor functions operate on a cl_async_proc_t structure
-*	which should be treated as opaque and manipulated only through the provided
-*	functions.
-*
-* SEE ALSO
-*	Structures:
-*		cl_async_proc_t, cl_async_proc_item_t
-*
-*	Initialization:
-*		cl_async_proc_construct, cl_async_proc_init, cl_async_proc_destroy
-*
-*	Manipulation:
-*		cl_async_proc_queue
-*********/
-
-/****s* Component Library: Asynchronous Processor/cl_async_proc_t
-* NAME
-*	cl_async_proc_t
-*
-* DESCRIPTION
-*	Asynchronous processor structure.
-*
-*	The cl_async_proc_t structure should be treated as opaque, and should be
-*	manipulated only through the provided functions.
-*
-* SYNOPSIS
-*/
-typedef struct _cl_async_proc
-{
-	cl_thread_pool_t	thread_pool;
-	cl_qlist_t			item_queue;
-	cl_spinlock_t		lock;
-
-} cl_async_proc_t;
-/*
-* FIELDS
-*	item_pool
-*		Pool of items storing the callback function and contexts to be invoked
-*		by the asynchronous processor's threads.
-*
-*	thread_pool
-*		Thread pool that will invoke the callbacks.
-*
-*	item_queue
-*		Queue of items that the threads should process.
-*
-*	lock
-*		Lock used to synchronize access to the item pool and queue.
-*
-* SEE ALSO
-*	Asynchronous Processor
-*********/
-
-/*
- * Declare the structure so we can reference it in the following function
- * prototype.
- */
-typedef struct _cl_async_proc_item	*__p_cl_async_proc_item_t;
-
-/****d* Component Library: Asynchronous Processor/cl_pfn_async_proc_cb_t
-* NAME
-*	cl_pfn_async_proc_cb_t
-*
-* DESCRIPTION
-*	The cl_pfn_async_proc_cb_t function type defines the prototype for
-*	callbacks queued to and invoked by the asynchronous processor.
-*
-* SYNOPSIS
-*/
-typedef void
-(*cl_pfn_async_proc_cb_t)(
-	IN	struct _cl_async_proc_item	*p_item );
-/*
-* PARAMETERS
-*	p_item
-*		Pointer to the cl_async_proc_item_t structure that was queued in
-*		a call to cl_async_proc_queue.
-*
-* NOTES
-*	This function type is provided as function prototype reference for the
-*	function provided by users as a parameter to the cl_async_proc_queue
-*	function.
-*
-* SEE ALSO
-*	Asynchronous Processor, cl_async_proc_item_t
-*********/
-
-/****s* Component Library: Asynchronous Processor/cl_async_proc_item_t
-* NAME
-*	cl_async_proc_item_t
-*
-* DESCRIPTION
-*	Asynchronous processor item structure passed to the cl_async_proc_queue
-*	function to queue a callback for execution.
-*
-* SYNOPSIS
-*/
-typedef struct _cl_async_proc_item
-{
-	cl_pool_item_t			pool_item;
-	cl_pfn_async_proc_cb_t	pfn_callback;
-
-} cl_async_proc_item_t;
-/*
-* FIELDS
-*	pool_item
-*		Pool item for queuing the item to be invoked by the asynchronous
-*		processor's threads.  This field is defined as a pool item to
-*		allow items to be managed by a pool.
-*
-*	pfn_callback
-*		Pointer to a callback function to invoke when the item is dequeued.
-*
-* SEE ALSO
-*	Asynchronous Processor, cl_async_proc_queue, cl_pfn_async_proc_cb_t
-*********/
-
-/****f* Component Library: Asynchronous Processor/cl_async_proc_construct
-* NAME
-*	cl_async_proc_construct
-*
-* DESCRIPTION
-*	The cl_async_proc_construct function initializes the state of a
-*	thread pool.
-*
-* SYNOPSIS
-*/
-void
-cl_async_proc_construct(
-	IN	cl_async_proc_t* const	p_async_proc );
-/*
-* PARAMETERS
-*	p_async_proc
-*		[in] Pointer to an asynchronous processor structure.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	Allows calling cl_async_proc_destroy without first calling
-*	cl_async_proc_init.
-*
-*	Calling cl_async_proc_construct is a prerequisite to calling any other
-*	thread pool function except cl_async_proc_init.
-*
-* SEE ALSO
-*	Asynchronous Processor, cl_async_proc_init, cl_async_proc_destroy
-*********/
-
-/****f* Component Library: Asynchronous Processor/cl_async_proc_init
-* NAME
-*	cl_async_proc_init
-*
-* DESCRIPTION
-*	The cl_async_proc_init function initialized an asynchronous processor
-*	for use.
-*
-* SYNOPSIS
-*/
-cl_status_t
-cl_async_proc_init(
-	IN	cl_async_proc_t* const	p_async_proc,
-	IN	const uint32_t			thread_count,
-	IN	const char* const		name );
-/*
-* PARAMETERS
-*	p_async_proc
-*		[in] Pointer to an asynchronous processor structure to initialize.
-*
-*	thread_count
-*		[in] Number of threads to be managed by the asynchronous processor.
-*
-*	name
-*		[in] Name to associate with the threads.  The name may be up to 16
-*		characters, including a terminating null character.  All threads
-*		created in the asynchronous processor have the same name.
-*
-* RETURN VALUES
-*	CL_SUCCESS if the asynchronous processor creation succeeded.
-*
-*	CL_INSUFFICIENT_MEMORY if there was not enough memory to inititalize
-*	the asynchronous processor.
-*
-*	CL_ERROR if the threads could not be created.
-*
-* NOTES
-*	cl_async_proc_init creates and starts the specified number of threads.
-*	If thread_count is zero, the asynchronous processor creates as many
-*	threads as there are processors in the system.
-*
-* SEE ALSO
-*	Asynchronous Processor, cl_async_proc_construct, cl_async_proc_destroy,
-*	cl_async_proc_queue
-*********/
-
-/****f* Component Library: Asynchronous Processor/cl_async_proc_destroy
-* NAME
-*	cl_async_proc_destroy
-*
-* DESCRIPTION
-*	The cl_async_proc_destroy function performs any necessary cleanup
-*	for a thread pool.
-*
-* SYNOPSIS
-*/
-void
-cl_async_proc_destroy(
-	IN	cl_async_proc_t* const	p_async_proc );
-/*
-* PARAMETERS
-*	p_async_proc
-*		[in] Pointer to an asynchronous processor structure to destroy.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	This function blocks until all threads exit, and must therefore not
-*	be called from any of the asynchronous processor's threads. Because of
-*	its blocking nature, callers of cl_async_proc_destroy must ensure that
-*	entering a wait state is valid from the calling thread context.
-*
-*	This function should only be called after a call to
-*	cl_async_proc_construct or cl_async_proc_init.
-*
-* SEE ALSO
-*	Asynchronous Processor, cl_async_proc_construct, cl_async_proc_init
-*********/
-
-/****f* Component Library: Asynchronous Processor/cl_async_proc_queue
-* NAME
-*	cl_async_proc_queue
-*
-* DESCRIPTION
-*	The cl_async_proc_queue function queues a callback to an asynchronous
-*	processor.
-*
-* SYNOPSIS
-*/
-void
-cl_async_proc_queue(
-	IN	cl_async_proc_t* const		p_async_proc,
-	IN	cl_async_proc_item_t* const	p_item );
-/*
-* PARAMETERS
-*	p_async_proc
-*		[in] Pointer to an asynchronous processor structure to initialize.
-*
-*	p_item
-*		[in] Pointer to an asynchronous processor item to queue for execution.
-*		The callback and context fields of the item must be valid.
-*
-* RETURN VALUES
-*	This function does not return a value.
-*
-* SEE ALSO
-*	Asynchronous Processor, cl_async_proc_init, cl_pfn_async_proc_cb_t
-*********/
-
-END_C_DECLS
-
-#endif	/* !defined(_CL_ASYNC_PROC_H_) */
diff --git a/osm/include/complib/cl_memory.h b/osm/include/complib/cl_memory.h
deleted file mode 100644
index 9a8580b..0000000
--- a/osm/include/complib/cl_memory.h
+++ /dev/null
@@ -1,663 +0,0 @@
-/*
- * Copyright (c) 2004-2006 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
- * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-/*
- * Abstract:
- *	Declaration of generic memory allocation calls.
- *
- * Environment:
- *	All
- *
- * $Revision: 1.4 $
- */
-
-#ifndef _CL_MEMORY_H_
-#define _CL_MEMORY_H_
-
-#include <complib/cl_types.h>
-
-#ifdef __cplusplus
-#  define BEGIN_C_DECLS extern "C" {
-#  define END_C_DECLS   }
-#else /* !__cplusplus */
-#  define BEGIN_C_DECLS
-#  define END_C_DECLS
-#endif /* __cplusplus */
-
-BEGIN_C_DECLS
-
-/****h* Public/Memory Management
-* NAME
-*	Memory Management
-*
-* DESCRIPTION
-*	The memory management functionality provides memory manipulation
-*	functions as well as powerful debugging tools.
-*
-*	The Allocation Tracking functionality provides a means for tracking memory
-*	allocations in order to detect memory leaks.
-*
-*	Memory allocation tracking stores the file name and line number where
-*	allocations occur. Gathering this information does have an adverse impact
-*	on performance, and memory tracking should therefore not be enabled in
-*	release builds of software.
-*
-*	Memory tracking is compiled into the debug version of the library,
-*	and can be enabled for the release version as well. To Enable memory
-*	tracking in a release build of the public layer, users should define
-*	the MEM_TRACK_ON keyword for compilation.
-*********/
-
-/****i* Public: Memory Management/__cl_mem_track
-* NAME
-*	__cl_mem_track
-*
-* DESCRIPTION
-*	The __cl_mem_track function enables or disables memory allocation tracking.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated))
-__cl_mem_track(
-	IN	const boolean_t	start );
-/*
-* PARAMETERS
-*	start
-*		[in] Specifies whether to start or stop memory tracking.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	This function performs all necessary initialization for tracking
-*	allocations.  Users should never call this function, as it is called by
-*	the component library framework.
-*
-*	If the Start parameter is set to TRUE, the function starts tracking memory
-*	usage if not already started. When set to FALSE, memory tracking is stoped
-*	and all remaining allocations are displayed to the applicable debugger, if
-*	any.
-*
-*	Starting memory tracking when it is already started has no effect.
-*	Likewise, stoping memory tracking when it is already stopped has no effect.
-*
-* SEE ALSO
-*	Memory Management, cl_mem_display
-**********/
-
-/****f* Public: Memory Management/cl_mem_display
-* NAME
-*	cl_mem_display
-*
-* DESCRIPTION
-*	The cl_mem_display function displays all tracked memory allocations to
-*	the applicable debugger.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated))
-cl_mem_display( void );
-/*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	Each tracked memory allocation is displayed along with the file name and
-*	line number that allocated it.
-*
-*	Output is sent to the platform's debugging target, which may be the
-*	system log file.
-*
-* SEE ALSO
-*	Memory Management
-**********/
-
-/****f* Public: Memory Management/cl_mem_check
-* NAME
-*	cl_mem_check
-*
-* DESCRIPTION
-*	The cl_mem_check function checks all tracked memory allocations to
-*	the applicable debugger.
-*
-* SYNOPSIS
-*/
-boolean_t __attribute__((deprecated))
-cl_mem_check( void );
-/*
-* RETURN VALUE
-*	TRUE if no errors were found. FALSE - otherwise.
-*
-* NOTES
-*	Each tracked memory allocation is displayed along with the file name and
-*	line number that allocated it.
-*
-*	Output is sent to the platform's debugging target, which may be the
-*	system log file.
-*
-* SEE ALSO
-*	Memory Management
-**********/
-
-/****i* Public: Memory Management/__cl_malloc_trk
-* NAME
-*	__cl_malloc_trk
-*
-* DESCRIPTION
-*	The __cl_malloc_trk function allocates and tracks a block of memory.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated)) *
-__cl_malloc_trk(
-	IN	const char* const	p_file_name,
-	IN	const int32_t		line_num,
-	IN	const size_t		size );
-/*
-* PARAMETERS
-*	p_file_name
-*		[in] Name of the source file initiating the allocation.
-*
-*	line_num
-*		[in] Line number in the specified file where the allocation is
-*		initiated
-*
-*	size
-*		[in] Size of the requested allocation.
-*
-* RETURN VALUES
-*	Pointer to allocated memory if successful.
-*
-*	NULL otherwise.
-*
-* NOTES
-*	Allocated memory follows alignment rules specific to the different
-*	environments.
-*	This function is should not be called directly.  The cl_malloc macro will
-*	redirect users to this function when memory tracking is enabled.
-*
-* SEE ALSO
-*	Memory Management, __cl_malloc_ntrk, __cl_zalloc_trk, __cl_free_trk
-**********/
-
-/****i* Public: Memory Management/__cl_zalloc_trk
-* NAME
-*	__cl_zalloc_trk
-*
-* DESCRIPTION
-*	The __cl_zalloc_trk function allocates and tracks a block of memory
-*	initialized to zero.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated)) *
-__cl_zalloc_trk(
-	IN	const char* const	p_file_name,
-	IN	const int32_t		line_num,
-	IN	const size_t		bytes );
-/*
-* PARAMETERS
-*	p_file_name
-*		[in] Name of the source file initiating the allocation.
-*
-*	line_num
-*		[in] Line number in the specified file where the allocation is
-*		initiated
-*
-*	size
-*		[in] Size of the requested allocation.
-*
-* RETURN VALUES
-*	Pointer to allocated memory if successful.
-*
-*	NULL otherwise.
-*
-* NOTES
-*	Allocated memory follows alignment rules specific to the different
-*	environments.
-*	This function should not be called directly.  The cl_zalloc macro will
-*	redirect users to this function when memory tracking is enabled.
-*
-* SEE ALSO
-*	Memory Management, __cl_zalloc_ntrk, __cl_malloc_trk, __cl_free_trk
-**********/
-
-/****i* Public: Memory Management/__cl_malloc_ntrk
-* NAME
-*	__cl_malloc_ntrk
-*
-* DESCRIPTION
-*	The __cl_malloc_ntrk function allocates a block of memory.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated)) *
-__cl_malloc_ntrk(
-	IN	const size_t		size );
-/*
-* PARAMETERS
-*	size
-*		[in] Size of the requested allocation.
-*
-* RETURN VALUES
-*	Pointer to allocated memory if successful.
-*
-*	NULL otherwise.
-*
-* NOTES
-*	Allocated memory follows alignment rules specific to the different
-*	environments.
-*	This function is should not be called directly.  The cl_malloc macro will
-*	redirect users to this function when memory tracking is not enabled.
-*
-* SEE ALSO
-*	Memory Management, __cl_malloc_trk, __cl_zalloc_ntrk, __cl_free_ntrk
-**********/
-
-/****i* Public: Memory Management/__cl_zalloc_ntrk
-* NAME
-*	__cl_zalloc_ntrk
-*
-* DESCRIPTION
-*	The __cl_zalloc_ntrk function allocates a block of memory
-*	initialized to zero.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated)) *
-__cl_zalloc_ntrk(
-	IN	const size_t		bytes );
-/*
-* PARAMETERS
-*	size
-*		[in] Size of the requested allocation.
-*
-* RETURN VALUES
-*	Pointer to allocated memory if successful.
-*
-*	NULL otherwise.
-*
-* NOTES
-*	Allocated memory follows alignment rules specific to the different
-*	environments.
-*	This function should not be called directly.  The cl_zalloc macro will
-*	redirect users to this function when memory tracking is not enabled.
-*
-* SEE ALSO
-*	Memory Management, __cl_zalloc_trk, __cl_malloc_ntrk, __cl_free_ntrk
-**********/
-
-/****i* Public: Memory Management/__cl_free_trk
-* NAME
-*	__cl_free_trk
-*
-* DESCRIPTION
-*	The __cl_free_trk function deallocates a block of tracked memory.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated))
-__cl_free_trk(
-  IN	const char* const	p_file_name,
-  IN	const int32_t		line_num,  
-  IN	void* const	p_memory );
-/*
-* PARAMETERS
-*	p_memory
-*		[in] Pointer to a memory block.
-*
-*	p_file_name
-*		[in] Name of the source file initiating the allocation.
-*
-*	line_num
-*		[in] Line number in the specified file where the allocation is
-*		initiated
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	The p_memory parameter is the pointer returned by a previous call to
-*	__cl_malloc_trk, or __cl_zalloc_trk.
-*
-*	__cl_free_trk has no effect if p_memory is NULL.
-*
-*	This function should not be called directly.  The cl_free macro will
-*	redirect users to this function when memory tracking is enabled.
-*
-* SEE ALSO
-*	Memory Management, __cl_free_ntrk, __cl_malloc_trk, __cl_zalloc_trk
-**********/
-
-/****i* Public: Memory Management/__cl_free_ntrk
-* NAME
-*	__cl_free_ntrk
-*
-* DESCRIPTION
-*	The __cl_free_ntrk function deallocates a block of memory.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated))
-__cl_free_ntrk(
-	IN	void* const	p_memory );
-/*
-* PARAMETERS
-*	p_memory
-*		[in] Pointer to a memory block.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	The p_memory parameter is the pointer returned by a previous call to
-*	__cl_malloc_ntrk, or __cl_zalloc_ntrk.
-*
-*	__cl_free_ntrk has no effect if p_memory is NULL.
-*
-*	This function should not be called directly.  The cl_free macro will
-*	redirect users to this function when memory tracking is not enabled.
-*
-* SEE ALSO
-*	Memory Management, __cl_free_ntrk, __cl_malloc_trk, __cl_zalloc_trk
-**********/
-
-/****f* Public: Memory Management/cl_malloc
-* NAME
-*	cl_malloc
-*
-* DESCRIPTION
-*	The cl_malloc function allocates a block of memory.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated)) *
-cl_malloc(
-	IN	const size_t	size );
-/*
-* PARAMETERS
-*	size
-*		[in] Size of the requested allocation.
-*
-* RETURN VALUES
-*	Pointer to allocated memory if successful.
-*
-*	NULL otherwise.
-*
-* NOTES
-*	Allocated memory follows alignment rules specific to the different
-*	environments.
-*
-* SEE ALSO
-*	Memory Management, cl_free, cl_zalloc, cl_memset, cl_memclr, cl_memcpy, cl_memcmp
-**********/
-
-/****f* Public: Memory Management/cl_zalloc
-* NAME
-*	cl_zalloc
-*
-* DESCRIPTION
-*	The cl_zalloc function allocates a block of memory initialized to zero.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated)) *
-cl_zalloc(
-	IN	const size_t	size );
-/*
-* PARAMETERS
-*	size
-*		[in] Size of the requested allocation.
-*
-* RETURN VALUES
-*	Pointer to allocated memory if successful.
-*
-*	NULL otherwise.
-*
-* NOTES
-*	Allocated memory follows alignment rules specific to the different
-*	environments.
-*
-* SEE ALSO
-*	Memory Management, cl_free, cl_malloc, cl_memset, cl_memclr, cl_memcpy, cl_memcmp
-**********/
-
-/****f* Public: Memory Management/cl_free
-* NAME
-*	cl_free
-*
-* DESCRIPTION
-*	The cl_free function deallocates a block of memory.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated))
-cl_free(
-	IN	void* const	p_memory );
-/*
-* PARAMETERS
-*	p_memory
-*		[in] Pointer to a memory block.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	The p_memory parameter is the pointer returned by a previous call to
-*	cl_malloc, or cl_zalloc.
-*
-*	cl_free has no effect if p_memory is NULL.
-*
-* SEE ALSO
-*	Memory Management, cl_alloc, cl_zalloc
-**********/
-
-/****f* Public: Memory Management/cl_memset
-* NAME
-*	cl_memset
-*
-* DESCRIPTION
-*	The cl_memset function sets every byte in a memory range to a given value.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated)) 
-cl_memset(
-	IN	void* const		p_memory,
-	IN	const uint8_t	fill,
-	IN	const size_t	count );
-/*
-* PARAMETERS
-*	p_memory
-*		[in] Pointer to a memory block.
-*
-*	fill
-*		[in] Byte value with which to fill the memory.
-*
-*	count
-*		[in] Number of bytes to set.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* SEE ALSO
-*	Memory Management, cl_memclr, cl_memcpy, cl_memcmp
-**********/
-
-/****f* Public: Memory Management/cl_memclr
-* NAME
-*	cl_memclr
-*
-* DESCRIPTION
-*	The cl_memclr function sets every byte in a memory range to zero.
-*
-* SYNOPSIS
-*/
-static inline void __attribute__((deprecated))
-cl_memclr(
-	IN	void* const		p_memory,
-	IN	const size_t	count )
-{
-	memset( p_memory, 0, count );
-}
-/*
-* PARAMETERS
-*	p_memory
-*		[in] Pointer to a memory block.
-*
-*	count
-*		[in] Number of bytes to set.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* SEE ALSO
-*	Memory Management, cl_memset, cl_memcpy, cl_memcmp
-**********/
-
-/****f* Public: Memory Management/cl_memcpy
-* NAME
-*	cl_memcpy
-*
-* DESCRIPTION
-*	The cl_memcpy function copies a given number of bytes from
-*	one buffer to another.
-*
-* SYNOPSIS
-*/
-void __attribute__((deprecated)) *
-cl_memcpy(
-	IN	void* const			p_dest,
-	IN	const void* const	p_src,
-	IN	const size_t		count );
-/*
-* PARAMETERS
-*	p_dest
-*		[in] Pointer to the buffer being copied to.
-*
-*	p_src
-*		[in] Pointer to the buffer being copied from.
-*
-*	count
-*		[in] Number of bytes to copy from the source buffer to the
-*		destination buffer.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* SEE ALSO
-*	Memory Management, cl_memset, cl_memclr, cl_memcmp
-**********/
-
-/****f* Public: Memory Management/cl_memcmp
-* NAME
-*	cl_memcmp
-*
-* DESCRIPTION
-*	The cl_memcmp function compares two memory buffers.
-*
-* SYNOPSIS
-*/
-int32_t  __attribute__((deprecated))
-cl_memcmp(
-	IN	const void* const	p_mem,
-	IN	const void* const	p_ref,
-	IN	const size_t		count );
-/*
-* PARAMETERS
-*	p_mem
-*		[in] Pointer to a memory block being compared.
-*
-*	p_ref
-*		[in] Pointer to the reference memory block to compare against.
-*
-*	count
-*		[in] Number of bytes to compare.
-*
-* RETURN VALUES
-*	Returns less than zero if p_mem is less than p_ref.
-*
-*	Returns greater than zero if p_mem is greater than p_ref.
-*
-*	Returns zero if the two memory regions are the identical.
-*
-* SEE ALSO
-*	Memory Management, cl_memset, cl_memclr, cl_memcpy
-**********/
-
-#if defined( CL_NO_TRACK_MEM ) && defined( CL_TRACK_MEM )
-	#error Conflict: Cannot define both CL_NO_TRACK_MEM and CL_TRACK_MEM.
-#endif
-
-/*
- * Turn on memory allocation tracking in debug builds if not explicitly
- * disabled or already turned on.
- */
-#if defined( _DEBUG_ ) && \
-	!defined( CL_NO_TRACK_MEM ) && \
-	!defined( CL_TRACK_MEM )
-	#define CL_TRACK_MEM
-#endif
-
-/*
- * Define allocation macro.
- */
-#if defined( CL_TRACK_MEM )
-
-#define cl_malloc( a )	\
-	__cl_malloc_trk( __FILE__, __LINE__, a )
-
-#define cl_zalloc( a )	\
-	__cl_zalloc_trk( __FILE__, __LINE__, a )
-
-#define cl_free( a )	\
-	__cl_free_trk( __FILE__, __LINE__, a )
-
-#else	/* !defined( CL_TRACK_MEM ) */
-
-#define cl_malloc( a )	\
-	__cl_malloc_ntrk( a )
-
-#define cl_zalloc( a )	\
-	__cl_zalloc_ntrk( a )
-
-#define cl_free( a )	\
-	__cl_free_ntrk( a )
-
-#endif	/* defined( CL_TRACK_MEM ) */
-
-END_C_DECLS
-
-#endif /* _CL_MEMORY_H_ */
diff --git a/osm/include/complib/cl_memtrack.h b/osm/include/complib/cl_memtrack.h
deleted file mode 100644
index 9e97136..0000000
--- a/osm/include/complib/cl_memtrack.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
- * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-/*
- * Abstract:
- *	Definitions of Data-Structures for memory allocation tracking functions.
- *
- * Environment:
- *	All
- *
- * $Revision: 1.3 $
- */
-
-
-#ifndef _CL_MEMTRACK_H_
-#define _CL_MEMTRACK_H_
-
-#include <complib/cl_types.h>
-#include <complib/cl_memory.h>
-#include <complib/cl_debug.h>
-#include <complib/cl_qlist.h>
-#include <complib/cl_spinlock.h>
-
-#ifdef __cplusplus
-#  define BEGIN_C_DECLS extern "C" {
-#  define END_C_DECLS   }
-#else /* !__cplusplus */
-#  define BEGIN_C_DECLS
-#  define END_C_DECLS
-#endif /* __cplusplus */
-
-BEGIN_C_DECLS
-
-/* Structure to track memory allocations. */
-typedef struct _cl_mem_tracker
-{
-	/* List for tracking memory allocations. */
-	cl_qlist_t		alloc_list;
-
-	/* Lock for synchronization. */
-	cl_spinlock_t	lock;
-
-	/* List to manage free headers. */
-	cl_qlist_t		free_hdr_list;
-
-} cl_mem_tracker_t __attribute__((deprecated));
-
-#define FILE_NAME_LENGTH	64
-
-/* Header for all memory allocations. */
-typedef struct _cl_malloc_hdr
-{
-	cl_list_item_t		list_item;
-	void				*p_mem;
-	char				file_name[FILE_NAME_LENGTH];
-	int32_t				line_num;
-
-} cl_malloc_hdr_t __attribute__((deprecated));
-
-extern cl_mem_tracker_t		*gp_mem_tracker;
-
-END_C_DECLS
-
-#endif	/* _CL_MEMTRACK_H_ */
diff --git a/osm/include/complib/cl_perf.h b/osm/include/complib/cl_perf.h
deleted file mode 100644
index 522f23f..0000000
--- a/osm/include/complib/cl_perf.h
+++ /dev/null
@@ -1,708 +0,0 @@
-/*
- * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved.
- * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-/*
- * Abstract:
- *	Declaration of performance tracking.
- *
- * Environment:
- *	All
- *
- * $Revision: 1.3 $
- */
-
-#ifndef _CL_PERF_H_
-#define _CL_PERF_H_
-
-#include <complib/cl_types.h>
-#include <complib/cl_spinlock.h>
-#include <complib/cl_timer.h>
-
-#ifdef __cplusplus
-#  define BEGIN_C_DECLS extern "C" {
-#  define END_C_DECLS   }
-#else /* !__cplusplus */
-#  define BEGIN_C_DECLS
-#  define END_C_DECLS
-#endif /* __cplusplus */
-
-BEGIN_C_DECLS
-
-/****h* Component Library/Performance Counters
-* NAME
-*	Performance Counters
-*
-* DESCRIPTION
-*	The performance counters allows timing operations to benchmark
-*	software performance and help identify potential bottlenecks.
-*
-*	All performance counters are NULL macros when disabled, preventing them
-*	from adversly affecting performance in builds where the counters are not
-*	used.
-*
-*	Each counter records elapsed time in micro-seconds, minimum time elapsed,
-*	and total number of samples.
-*
-*	Each counter is independently protected by a spinlock, allowing use of
-*	the counters in multi-processor environments.
-*
-*	The impact of serializing access to performance counters is measured,
-*	allowing measurements to be corrected as necessary.
-*
-* NOTES
-*	Performance counters do impact performance, and should only be enabled
-*	when gathering data.  Counters can be enabled or disabled on a per-user
-*	basis at compile time.  To enable the counters, users should define
-*	the PERF_TRACK_ON keyword before including the cl_perf.h file.
-*	Undefining the PERF_TRACK_ON keyword disables the performance counters.
-*	When disabled, all performance tracking calls resolve to no-ops.
-*
-*	When using performance counters, it is the user's responsibility to
-*	maintain the counter indexes.  It is recomended that users define an
-*	enumerated type to use for counter indexes.  It improves readability
-*	and simplifies maintenance by reducing the work necessary in managing
-*	the counter indexes.
-*
-* SEE ALSO
-*	Structures:
-*		cl_perf_t
-*
-*	Initialization:
-*		cl_perf_construct, cl_perf_init, cl_perf_destroy
-*
-*	Manipulation
-*		cl_perf_reset, cl_perf_display, cl_perf_start, cl_perf_update,
-*		cl_perf_log, cl_perf_stop
-*
-*	Macros:
-*		PERF_DECLARE, PERF_DECLARE_START
-*********/
-
-/*
- * Number of times the counter calibration test is executed.  This is used
- * to determine the average time to use a performance counter.
- */
-#define PERF_CALIBRATION_TESTS		100000
-
-/****i* Component Library: Performance Counters/cl_perf_data_t
-* NAME
-*	cl_perf_data_t
-*
-* DESCRIPTION
-*	The cl_perf_data_t structure is used to tracking information
-*	for a single counter.
-*
-* SYNOPSIS
-*/
-typedef struct _cl_perf_data
-{
-	uint64_t		count;
-	uint64_t		total_time;
-	uint64_t		min_time;
-	cl_spinlock_t	lock;
-
-} cl_perf_data_t;
-/*
-* FIELDS
-*	count
-*		Number of samples in the counter.
-*
-*	total_time
-*		Total time for all samples, in microseconds.
-*
-*	min_time
-*		Minimum time for any sample in the counter, in microseconds.
-*
-*	lock
-*		Spinlock to serialize counter updates.
-*
-* SEE ALSO
-*	Performance Counters
-*********/
-
-/****i* Component Library: Performance Counters/cl_perf_t
-* NAME
-*	cl_perf_t
-*
-* DESCRIPTION
-*	The cl_perf_t structure serves as a container for a group of performance
-*	counters and related calibration data.
-*
-*	This structure should be treated as opaque and be manipulated only through
-*	the provided functions.
-*
-* SYNOPSIS
-*/
-typedef struct _cl_perf
-{
-	cl_perf_data_t	*data_array;
-	uintn_t			size;
-	uint64_t		locked_calibration_time;
-	uint64_t		normal_calibration_time;
-	cl_state_t		state;
-
-} cl_perf_t;
-/*
-* FIELDS
-*	data_array
-*		Pointer to the array of performance counters.
-*
-*	size
-*		Number of counters in the counter array.
-*
-*	locked_calibration_time
-*		Time needed to update counters while holding a spinlock.
-*
-*	normal_calibration_time
-*		Time needed to update counters while not holding a spinlock.
-*
-*	state
-*		State of the performance counter provider.
-*
-* SEE ALSO
-*	Performance Counters, cl_perf_data_t
-*********/
-
-/****f* Component Library: Performance Counters/cl_perf_construct
-* NAME
-*	cl_perf_construct
-*
-* DESCRIPTION
-*	The cl_perf_construct macro constructs a performance
-*	tracking container.
-*
-* SYNOPSIS
-*/
-void
-cl_perf_construct(
-	IN	cl_perf_t* const	p_perf );
-/*
-* PARAMETERS
-*	p_perf
-*		[in] Pointer to a performance counter container to construct.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	cl_perf_construct allows calling cl_perf_destroy without first calling
-*	cl_perf_init.
-*
-*	Calling cl_perf_construct is a prerequisite to calling any other
-*	perfromance counter function except cl_perf_init.
-*
-*	This function is implemented as a macro and has no effect when
-*	performance counters are disabled.
-*
-* SEE ALSO
-*	Performance Counters, cl_perf_init, cl_perf_destroy
-*********/
-
-/****f* Component Library: Performance Counters/cl_perf_init
-* NAME
-*	cl_perf_init
-*
-* DESCRIPTION
-*	The cl_perf_init function initializes a performance counter container
-*	for use.
-*
-* SYNOPSIS
-*/
-cl_status_t
-cl_perf_init(
-	IN	cl_perf_t* const	p_perf,
-	IN	const uintn_t		num_counters );
-/*
-* PARAMETERS
-*	p_perf
-*		[in] Pointer to a performance counter container to initalize.
-*
-*	num_cntrs
-*		[in] Number of counters to allocate in the container.
-*
-* RETURN VALUES
-*	CL_SUCCESS if initialization was successful.
-*
-*	CL_INSUFFICIENT_MEMORY if there was not enough memory to initialize
-*	the container.
-*
-*	CL_ERROR if an error was encountered initializing the locks for the
-*	performance counters.
-*
-* NOTES
-*	This function allocates all memory required for the requested number of
-*	counters and initializes all locks protecting those counters.  After a
-*	successful initialization, cl_perf_init calibrates the counters and
-*	resets their value.
-*
-*	This function is implemented as a macro and has no effect when
-*	performance counters are disabled.
-*
-* SEE ALSO
-*	Performance Counters, cl_perf_construct, cl_perf_destroy, cl_perf_display
-*********/
-
-/****f* Component Library: Performance Counters/cl_perf_destroy
-* NAME
-*	cl_perf_destroy
-*
-* DESCRIPTION
-*	The cl_perf_destroy function destroys a performance tracking container.
-*
-* SYNOPSIS
-*/
-void
-cl_perf_destroy(
-	IN	cl_perf_t* const	p_perf,
-	IN	const boolean_t		display );
-/*
-* PARAMETERS
-*	p_perf
-*		[in] Pointer to a performance counter container to destroy.
-*
-*	display
-*		[in] If TRUE, causes the performance counters to be displayed.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	cl_perf_destroy frees all resources allocated in a call to cl_perf_init.
-*	If the display parameter is set to TRUE, displays all counter values
-*	before deallocating resources.
-*
-*	This function should only be called after a call to cl_perf_construct
-*	or cl_perf_init.
-*
-*	This function is implemented as a macro and has no effect when
-*	performance counters are disabled.
-*
-* SEE ALSO
-*	Performance Counters, cl_perf_construct, cl_perf_init
-*********/
-
-/****f* Component Library: Performance Counters/cl_perf_reset
-* NAME
-*	cl_perf_reset
-*
-* DESCRIPTION
-*	The cl_perf_reset function resets the counters contained in
-*	a performance tracking container.
-*
-* SYNOPSIS
-*/
-void
-cl_perf_reset(
-	IN	cl_perf_t* const	p_perf );
-/*
-* PARAMETERS
-*	p_perf
-*		[in] Pointer to a performance counter container whose counters
-*		to reset.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	This function is implemented as a macro and has no effect when
-*	performance counters are disabled.
-*
-* SEE ALSO
-*	Performance Counters
-*********/
-
-/****f* Component Library: Performance Counters/cl_perf_display
-* NAME
-*	cl_perf_display
-*
-* DESCRIPTION
-*	The cl_perf_display function displays the current performance
-*	counter values.
-*
-* SYNOPSIS
-*/
-void
-cl_perf_display(
-	IN	const cl_perf_t* const	p_perf );
-/*
-* PARAMETERS
-*	p_perf
-*		[in] Pointer to a performance counter container whose counter
-*		values to display.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	This function is implemented as a macro and has no effect when
-*	performance counters are disabled.
-*
-* SEE ALSO
-*	Performance Counters, cl_perf_init
-*********/
-
-/****d* Component Library: Performance Counters/PERF_DECLARE
-* NAME
-*	PERF_DECLARE
-*
-* DESCRIPTION
-*	The PERF_DECLARE macro declares a performance counter variable used
-*	to store the starting time of a timing sequence.
-*
-* SYNOPSIS
-*	PERF_DECLARE( index )
-*
-* PARAMETERS
-*	index
-*		[in] Index of the performance counter for which to use this
-*		variable.
-*
-* NOTES
-*	Variables should generally be declared on the stack to support
-*	multi-threading.  In cases where a counter needs to be used to
-*	time operations accross multiple functions, care must be taken to
-*	ensure that the start time stored in this variable is not overwritten
-*	before the related performance counter has been updated.
-*
-*	This macro has no effect when performance counters are disabled.
-*
-* SEE ALSO
-*	Performance Counters, PERF_DECLARE_START, cl_perf_start, cl_perf_log,
-*	cl_perf_stop
-*********/
-
-/****d* Component Library: Performance Counters/PERF_DECLARE_START
-* NAME
-*	PERF_DECLARE_START
-*
-* DESCRIPTION
-*	The PERF_DECLARE_START macro declares a performance counter variable
-*	and sets it to the starting time of a timed sequence.
-*
-* SYNOPSIS
-*	PERF_DECLARE_START( index )
-*
-* PARAMETERS
-*	index
-*		[in] Index of the performance counter for which to use this
-*		variable.
-*
-* NOTES
-*	Variables should generally be declared on the stack to support
-*	multi-threading.
-*
-*	This macro has no effect when performance counters are disabled.
-*
-* SEE ALSO
-*	Performance Counters, PERF_DECLARE, cl_perf_start, cl_perf_log,
-*	cl_perf_stop
-*********/
-
-/****d* Component Library: Performance Counters/cl_perf_start
-* NAME
-*	cl_perf_start
-*
-* DESCRIPTION
-*	The cl_perf_start macro sets the starting value of a timed sequence.
-*
-* SYNOPSIS
-*/
-void
-cl_perf_start(
-	IN	const uintn_t index );
-/*
-* PARAMETERS
-*	index
-*		[in] Index of the performance counter to set.
-*
-* NOTES
-*	This macro has no effect when performance counters are disabled.
-*
-* SEE ALSO
-*	Performance Counters, PERF_DECLARE, PERF_DECLARE_START, cl_perf_log,
-*	cl_perf_update, cl_perf_stop
-*********/
-
-/****d* Component Library: Performance Counters/cl_perf_update
-* NAME
-*	cl_perf_update
-*
-* DESCRIPTION
-*	The cl_perf_update macro adds a timing sample based on a provided start
-*	time to a counter in a performance counter container.
-*
-* SYNOPSIS
-*/
-void
-cl_perf_update(
-	IN	cl_perf_t* const	p_perf,
-	IN	const uintn_t		index,
-	IN	const uint64_t		start_time );
-/*
-* PARAMETERS
-*	p_perf
-*		[in] Pointer to a performance counter container to whose counter
-*		the sample should be added.
-*
-*	index
-*		[in] Number of the performance counter to update with a new sample.
-*
-*	start_time
-*		[in] Timestamp to use as the start time for the timing sample.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	This macro has no effect when performance counters are disabled.
-*
-* SEE ALSO
-*	Performance Counters, PERF_DECLARE, PERF_DECLARE_START, cl_perf_start,
-*	cl_perf_lob, cl_perf_stop
-*********/
-
-/****d* Component Library: Performance Counters/cl_perf_log
-* NAME
-*	cl_perf_log
-*
-* DESCRIPTION
-*	The cl_perf_log macro adds a given timing sample to a
-*	counter in a performance counter container.
-*
-* SYNOPSIS
-*/
-void
-cl_perf_log(
-	IN	cl_perf_t* const	p_perf,
-	IN	const uintn_t		index,
-	IN	const uint64_t		pc_total_time );
-/*
-* PARAMETERS
-*	p_perf
-*		[in] Pointer to a performance counter container to whose counter
-*		the sample should be added.
-*
-*	index
-*		[in] Number of the performance counter to update with a new sample.
-*
-*	pc_total_time
-*		[in] Total elapsed time for the sample being added.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	This macro has no effect when performance counters are disabled.
-*
-* SEE ALSO
-*	Performance Counters, PERF_DECLARE, PERF_DECLARE_START, cl_perf_start,
-*	cl_perf_update, cl_perf_stop
-*********/
-
-/****d* Component Library: Performance Counters/cl_perf_stop
-* NAME
-*	cl_perf_stop
-*
-* DESCRIPTION
-*	The cl_perf_log macro updates a counter in a performance counter
-*	container with a new timing sample.
-*
-* SYNOPSIS
-*/
-void
-cl_perf_stop(
-	IN	cl_perf_t* const	p_perf,
-	IN	const uintn_t		index );
-/*
-* PARAMETERS
-*	p_perf
-*		[in] Pointer to a performance counter container to whose counter
-*		a sample should be added.
-*
-*	index
-*		[in] Number of the performance counter to update with a new sample.
-*
-* RETURN VALUE
-*	This function does not return a value.
-*
-* NOTES
-*	The ending time stamp is taken and elapsed time calculated before updating
-*	the specified counter.
-*
-*	This macro has no effect when performance counters are disabled.
-*
-* SEE ALSO
-*	Performance Counters, PERF_DECLARE, PERF_DECLARE_START, cl_perf_start,
-*	cl_perf_log
-*********/
-
-/*
- * PERF_TRACK_ON must be defined by the user before including this file to
- * enable performance tracking.  To disable tracking, users should undefine
- * PERF_TRACK_ON.
- */
-#if defined( PERF_TRACK_ON )
-/*
- * Enable performance tracking.
- */
-
-#define cl_perf_construct( p_perf ) \
-	__cl_perf_construct( p_perf )
-#define cl_perf_init( p_perf, num_counters ) \
-	__cl_perf_init( p_perf, num_counters )
-#define cl_perf_destroy( p_perf, display ) \
-	__cl_perf_destroy( p_perf, display )
-#define cl_perf_reset( p_perf ) \
-	__cl_perf_reset( p_perf )
-#define cl_perf_display( p_perf ) \
-	__cl_perf_display( p_perf )
-#define PERF_DECLARE( index ) \
-	uint64_t Pc##index
-#define PERF_DECLARE_START( index ) \
-	uint64 Pc##index = cl_get_time_stamp()
-#define cl_perf_start( index ) \
-	(Pc##index = cl_get_time_stamp())
-#define cl_perf_log( p_perf, index, pc_total_time ) \
-{\
-	/* Update the performance data.  This requires synchronization. */ \
-	cl_spinlock_acquire( &((cl_perf_t*)p_perf)->data_array[index].lock ); \
-	\
-	((cl_perf_t*)p_perf)->data_array[index].total_time += pc_total_time; \
-	((cl_perf_t*)p_perf)->data_array[index].count++; \
-	if( pc_total_time < ((cl_perf_t*)p_perf)->data_array[index].min_time ) \
-		((cl_perf_t*)p_perf)->data_array[index].min_time = pc_total_time; \
-	\
-	cl_spinlock_release( &((cl_perf_t*)p_perf)->data_array[index].lock );  \
-}
-#define cl_perf_update( p_perf, index, start_time )	\
-{\
-	/* Get the ending time stamp, and calculate the total time. */ \
-	uint64_t pc_total_time = cl_get_time_stamp() - start_time;\
-	/* Using stack variable for start time, stop and log  */ \
-	cl_perf_log( p_perf, index, pc_total_time ); \
-}
-
-#define cl_perf_stop( p_perf, index ) \
-{\
-	cl_perf_update( p_perf, index, Pc##index );\
-}
-
-#define cl_get_perf_values( p_perf, index, p_total, p_min, p_count )	\
-{\
-	*p_total = p_perf->data_array[index].total_time;	\
-	*p_min = p_perf->data_array[index].min_time;		\
-	*p_count = p_perf->data_array[index].count;			\
-}
-
-#define cl_get_perf_calibration( p_perf, p_locked_time, p_normal_time )	\
-{\
-	*p_locked_time = p_perf->locked_calibration_time;	\
-	*p_normal_time = p_perf->normal_calibration_time;	\
-}
-
-#define cl_get_perf_string( p_perf, i )	\
-"CL Perf:\t%lu\t%"PRIu64"\t%"PRIu64"\t%"PRIu64"\n",	\
-			i, p_perf->data_array[i].total_time,	\
-			p_perf->data_array[i].min_time, p_perf->data_array[i].count
-
-#else	/* PERF_TRACK_ON */
-/*
- * Disable performance tracking.
- */
-
-#define cl_perf_construct( p_perf )
-#define cl_perf_init( p_perf, num_cntrs )		CL_SUCCESS
-#define cl_perf_destroy( p_perf, display )
-#define cl_perf_reset( p_perf )
-#define cl_perf_display( p_perf )
-#define PERF_DECLARE( index )
-#define PERF_DECLARE_START( index )
-#define cl_perf_start( index )
-#define cl_perf_log( p_perf, index, pc_total_time )
-#define cl_perf_upadate( p_perf, index, start_time )
-#define cl_perf_stop( p_perf, index )
-#define cl_get_perf_values( p_perf, index, p_total, p_min, p_count )
-#define cl_get_perf_calibration( p_perf, p_locked_time, p_normal_time )
-#endif	/* PERF_TRACK_ON */
-
-/*
- * Internal performance tracking functions.  Users should never call these
- * functions directly.  Instead, use the macros defined above to resolve
- * to these functions when PERF_TRACK_ON is defined, which allows disabling
- * performance tracking.
- */
-
-/*
- * Initialize the state of the performance tracking structure.
- */
-void
-__cl_perf_construct(
-	IN	cl_perf_t* const		p_perf );
-
-/*
- * Size the performance tracking information and initialize all
- * related structures.
- */
-cl_status_t
-__cl_perf_init(
-	IN	cl_perf_t* const		p_perf,
-	IN	const uintn_t			num_counters );
-
-/*
- * Destroy the performance tracking data.
- */
-void
-__cl_perf_destroy(
-	IN	cl_perf_t* const		p_perf,
-	IN	const boolean_t			display );
-
-/*
- * Reset the performance tracking data.
- */
-void
-__cl_perf_reset(
-	IN	cl_perf_t* const		p_perf );
-
-/*
- * Display the current performance tracking data.
- */
-void
-__cl_perf_display(
-	IN	const cl_perf_t* const	p_perf );
-
-
-END_C_DECLS
-
-#endif	/* _CL_PERF_H_ */
-- 
1.5.0.1.40.gb40d





More information about the general mailing list