|
@@ -879,7 +879,7 @@ iter_prepare_cumulative_entry(struct hist_entry_iter *iter,
|
|
* cumulated only one time to prevent entries more than 100%
|
|
* cumulated only one time to prevent entries more than 100%
|
|
* overhead.
|
|
* overhead.
|
|
*/
|
|
*/
|
|
- he_cache = malloc(sizeof(*he_cache) * (iter->max_stack + 1));
|
|
|
|
|
|
+ he_cache = malloc(sizeof(*he_cache) * (callchain_cursor.nr + 1));
|
|
if (he_cache == NULL)
|
|
if (he_cache == NULL)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
|
|
@@ -1045,8 +1045,6 @@ int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al,
|
|
if (err)
|
|
if (err)
|
|
return err;
|
|
return err;
|
|
|
|
|
|
- iter->max_stack = max_stack_depth;
|
|
|
|
-
|
|
|
|
err = iter->ops->prepare_entry(iter, al);
|
|
err = iter->ops->prepare_entry(iter, al);
|
|
if (err)
|
|
if (err)
|
|
goto out;
|
|
goto out;
|