blob: 83ef38d86970189e0c3d49f44f7fa7b5b9352a8a [file] [log] [blame]
/*
*
* Copyright (c) 2012 Nest Labs, Inc.
* All rights reserved.
*
* This document is the property of Nest. It is considered
* confidential and proprietary information.
*
* This document may not be reproduced or transmitted in any form,
* in whole or in part, without the express written permission of
* Nest.
*
* Description:
* This file defines processor-architecture-specific constants,
* interfaces and types required for LwIP performance
* measurement.
*
*/
#ifndef NL_LWIP_FREERTOS_ARCH_PERF_H
#define NL_LWIP_FREERTOS_ARCH_PERF_H
#define PERF_START
#define PERF_STOP(s)
#if defined(BUILD_FEATURE_NL_PROFILE)
// Record the pbuf high watermark for this interval
void nl_profile_interval_set_pbuf_highwatermark(uint32_t pbuf_count, uint32_t pool_idx);
#define sys_profile_interval_set_pbuf_highwatermark(x,y) nl_profile_interval_set_pbuf_highwatermark(x,y)
struct pbuf;
void nl_profile_product_pbuf_allocate(const struct pbuf *pbuf);
void nl_profile_product_pbuf_free(const struct pbuf *pbuf);
#define sys_profile_pbuf_allocate(pbuf) nl_profile_product_pbuf_allocate(pbuf)
#define sys_profile_pbuf_free(pbuf) nl_profile_product_pbuf_free(pbuf)
void nl_profile_product_pbuf_transfer(const struct pbuf *new_pbuf, const struct pbuf *old_pbuf);
#define sys_profile_pbuf_transfer(x, y) nl_profile_product_pbuf_transfer(x, y)
#else /* defined(BUILD_FEATURE_NL_PROFILE) */
#define sys_profile_interval_set_pbuf_highwatermark(x,y)
#define sys_profile_pbuf_allocate(pbuf)
#define sys_profile_pbuf_free(pbuf)
#define sys_profile_pbuf_transfer(x, y)
#endif /* defined(BUILD_FEATURE_NL_PROFILE) */
#endif /* NL_LWIP_FREERTOS_ARCH_PERF_H */