Files
OpenCellular/include/task_filter.h
Che-yu Wu 64ecddfd86 ec: Add a task information library for the stack analyzer.
Add a shared library to export task information.
Modified the stack analyzer to get information from the shared library.
Show allocated stack sizes of tasks in the stack analyzer.

To get the all task information (including the allocated stack size),
A shared library is added and compiled with the board to export all
configurations of the tasklist.

BUG=chromium:648840
BRANCH=none
TEST=extra/stack_analyzer/stack_analyzer_unittest.py
     make BOARD=elm && extra/stack_analyzer/stack_analyzer.py \
         --objdump=arm-none-eabi-objdump \
         --addr2line=arm-none-eabi-addr2line \
         --export_taskinfo=./build/elm/util/export_taskinfo.so \
         --section=RW \
         ./build/elm/RW/ec.RW.elf
     make BOARD=${BOARD} SECTION=${SECTION} analyzestack

Change-Id: I72f01424142bb0a99c6776a55735557308e2cab6
Signed-off-by: Che-yu Wu <cheyuw@google.com>
Reviewed-on: https://chromium-review.googlesource.com/611693
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2017-08-15 00:25:20 -07:00

51 lines
1.2 KiB
C

/* Copyright 2017 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Filter tasklist in *.tasklist, depending on section (RO/RW), or
* TEST/CTS build.
*/
#ifndef __CROS_EC_TASK_FILTER_H
#define __CROS_EC_TASK_FILTER_H
#ifdef SECTION_IS_RO
#define TASK_NOTEST_RO TASK_NOTEST
#define TASK_TEST_RO TASK_TEST
#define TASK_ALWAYS_RO TASK_ALWAYS
#define TASK_NOTEST_RW(n, r, d, s)
#define TASK_TEST_RW(n, r, d, s)
#define TASK_ALWAYS_RW(n, r, d, s)
#else /* SECTION_IS_RW */
#define TASK_NOTEST_RW TASK_NOTEST
#define TASK_TEST_RW TASK_TEST
#define TASK_ALWAYS_RW TASK_ALWAYS
#define TASK_NOTEST_RO(n, r, d, s)
#define TASK_TEST_RO(n, r, d, s)
#define TASK_ALWAYS_RO(n, r, d, s)
#endif
/* excludes non-base tasks for test build */
#ifdef TEST_BUILD
#define TASK_NOTEST(n, r, d, s)
#define TASK_TEST TASK
#else
#define TASK_NOTEST TASK
#define CONFIG_TEST_TASK_LIST
#endif
#ifndef CTS_MODULE
#define CONFIG_CTS_TASK_LIST
#endif
#define TASK_ALWAYS TASK
/* If included directly from Makefile, dump task list. */
#ifdef _MAKEFILE
#define TASK(n, r, d, s) n
CONFIG_TASK_LIST CONFIG_TEST_TASK_LIST CONFIG_CTS_TASK_LIST
#endif
#endif /* __CROS_EC_TASK_FILTER_H */