On 06/07/2018 12:52 PM, Sage Weil wrote: > On Thu, 7 Jun 2018, Mohamad Gebai wrote: >> [snip] >> Any thought about the approach? How can I move this forward? > This is a huge improvement over manually writing the .tp files! I have > one thought, though. It's still necessary both to adjust the tracepoint > location, e.g., > > > - dout(30) << __func__ << " " << *(b_it->first) > - << " expected4release=" << blob_expected_for_release > - << " expected_allocations=" << bi.expected_allocations > - << dendl; > + trace_process_protrusive_extents_expected4release(*(b_it->first), > + blob_expected_for_release, bi.expected_allocations); > > and also to include the line in tracing/tracetool/subsys, eg., > > + process_protrusive_extents_expected4release(Blob blob, int64_t blob_expected_for_release, int64_t expected_allocations) "%s expected4release=%llu expected_allocations=%llu" 30 > > Do you think it's possible to declare these inline and generate the > tracing/tracetool/subsys files from the source? For example, write > something like > > trace(30, process_protrusive_extents_expected4release, > Blob *(b_it->first), > int64_t blob_expected_for_release, > int64_t bi.expected_allocations, > "%s expected4release=%llu expected_allocations=%llu"); > > A macro could expand that out to the function call, and a preprocessor > pass could slurp these up and generate the file for input to > tracetool (or tracetool could extract them from the source > directly). Good point, I definitely see that as a possibility. I'll fiddle with it and report back. Mohamad > It's still a bit more awkward than dout was in that (1) you have to name > the tracepoint and (2) you have to specify the types of the arguments. > That might be a good thing (blessing in disguise) to make you think more > carefully about the tracepoints, though. OTOH having to edit two files > and match up arguments and types seems needlessly tedious, though? Correct, the tracepoint name has to be meaningful since the formatting string isn't used. Mohamad -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html