Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156636
b: refs/heads/master
c: c0a8865
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Aug 9, 2009
1 parent 0d9f874 commit 8de4354
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 183f3b0887083d36c8a25cd5e3518906415d1889
refs/heads/master: c0a8865e32c8d1a562db38e06ef31ef23282f646
5 changes: 3 additions & 2 deletions trunk/tools/perf/util/callchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <stdio.h>
#include <stdbool.h>
#include <errno.h>
#include <math.h>

#include "callchain.h"

Expand Down Expand Up @@ -112,7 +113,7 @@ static void __sort_chain_graph_rel(struct callchain_node *node,
u64 min_hit;

node->rb_root = RB_ROOT;
min_hit = node->children_hit * min_percent / 100.0;
min_hit = ceil(node->children_hit * min_percent);

chain_for_each_child(child, node) {
__sort_chain_graph_rel(child, min_percent);
Expand All @@ -126,7 +127,7 @@ static void
sort_chain_graph_rel(struct rb_root *rb_root, struct callchain_node *chain_root,
u64 min_hit __used, struct callchain_param *param)
{
__sort_chain_graph_rel(chain_root, param->min_percent);
__sort_chain_graph_rel(chain_root, param->min_percent / 100.0);
rb_root->rb_node = chain_root->rb_root.rb_node;
}

Expand Down

0 comments on commit 8de4354

Please sign in to comment.