This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH broken] PR10257: Add support for sprint[ln](@hist_*).
- From: Josh Stone <jistone at redhat dot com>
- To: Przemyslaw Pawelczyk <przemyslaw at pawelczyk dot it>
- Cc: systemtap at sourceware dot org
- Date: Mon, 12 Oct 2009 13:53:44 -0700
- Subject: Re: [PATCH broken] PR10257: Add support for sprint[ln](@hist_*).
- References: <1255213558.128114.24766@debian>
First, I'm skeptical of how useful sprint for histograms will be -- it
seems like it will quite easily exceed MAXSTRINGLEN. I'm pretty sure
this is why we haven't already enabled it. Did you have some specific
use in mind?
On 10/10/2009 02:51 PM, Przemyslaw Pawelczyk wrote:
Currently this patch doesn't work, because tmpvar added in sprint case
in c_unparser::visit_print_format() doesn't increase number of __tmp
variables available in struct probe_XYZ_locals that is generated by
c_unparser::emit_common_header(). I certainly missed sth, but what?
Any help will be appreciated. Reviews are also welcomed.
There is also c_tmpcounter which needs to mirror the tmp allocations.
This is a sort of pre-visitor which creates the tmps in the context struct.
+static void _stp_stat_print_histogram_buf(char *buf, Hist st, stat *sd)
So much duplication with _stp_stat_print_histogram is not ok -- can you
make one a function of the other? It may help you to know that these
are equivalent:
_stp_printf(fmt, ...args...);
_stp_snprintf(NULL, 0, fmt, ...args...);
Josh