aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-02-27 10:37:47 -0500
committerTom Rini <trini@konsulko.com>2023-02-27 10:39:25 -0500
commit442e59e3a86478b010deefbec4384ab44aa61c65 (patch)
treec58356ce860efbfacd6d2ab796a4c8b83dc0d36c
parent6a1bb32ea305c06f4ff9e13535978eb1cbe60de6 (diff)
downloadu-boot-WIP/move-to-clang-15.zip
u-boot-WIP/move-to-clang-15.tar.gz
u-boot-WIP/move-to-clang-15.tar.bz2
proftool: Remove unused variables in make_flame_treeWIP/move-to-clang-15
With clang-15 we now get reported that in the make_flame_tree function, neither the missing_count nor depth variables are used, only incremenete/decremented. Remove these. Signed-off-by: Tom Rini <trini@konsulko.com> --- Cc: Simon Glass <sjg@chromium.org>
-rw-r--r--tools/proftool.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/tools/proftool.c b/tools/proftool.c
index 0893604..101bcb6 100644
--- a/tools/proftool.c
+++ b/tools/proftool.c
@@ -1713,18 +1713,11 @@ static int make_flame_tree(enum out_format_t out_format,
struct flame_state state;
struct flame_node *tree;
struct trace_call *call;
- int missing_count = 0;
- int i, depth;
+ int i;
/* maintain a stack of start times, etc. for 'calling' functions */
state.stack_ptr = 0;
- /*
- * The first thing in the trace may not be the top-level function, so
- * set the initial depth so that no function goes below depth 0
- */
- depth = -calc_min_depth();
-
tree = create_node("tree");
if (!tree)
return -1;
@@ -1736,16 +1729,10 @@ static int make_flame_tree(enum out_format_t out_format,
ulong timestamp = call->flags & FUNCF_TIMESTAMP_MASK;
struct func_info *func;
- if (entry)
- depth++;
- else
- depth--;
-
func = find_func_by_offset(call->func);
if (!func) {
warn("Cannot find function at %lx\n",
text_offset + call->func);
- missing_count++;
continue;
}