const char *str;
int max_lines;
int i, j, max;
+ int dumped;
chunk_reset(&trash);
if (!max_lines)
max_lines = SCHED_ACT_HASH_BUCKETS;
+ dumped = 0;
for (i = ctx->linenum; i < max_lines; i++) {
if (!tmp_activity[i].calls)
continue; // skip aggregated or empty entries
ctx->linenum = i;
+
+ /* resolve_sym_name() may be slow, better dump a few entries at a time */
+ if (dumped >= 10)
+ return 0;
+
chunk_reset(name_buffer);
caller = HA_ATOMIC_LOAD(&tmp_activity[i].caller);
/* failed, try again */
return 0;
}
+ dumped++;
}
if (applet_putchk(appctx, &trash) == -1) {
if (!max_lines)
max_lines = MEMPROF_HASH_BUCKETS + 1;
+ dumped = 0;
for (i = ctx->linenum; i < max_lines; i++) {
struct memprof_stats *entry = &tmp_memstats[i];
ctx->linenum = i;
if (!entry->alloc_calls && !entry->free_calls)
continue;
+
+ /* resolve_sym_name() may be slow, better dump a few entries at a time */
+ if (dumped >= 10)
+ return 0;
+
chunk_appendf(&trash, "%11llu %11llu %14llu %14llu| %16p ",
entry->alloc_calls, entry->free_calls,
entry->alloc_tot, entry->free_tot,
if (applet_putchk(appctx, &trash) == -1)
return 0;
+
+ dumped++;
}
if (applet_putchk(appctx, &trash) == -1)