Normal optimized mode can make it difficult to see which stap probe
was being invoked for which C probe handler body, as identical probe
handlers are reused. This is inconvenient if one just has a kernel
crash backtrace to start from from.
* translate.cxx (emit_common_header, emit_probe): In -u mode,
eschew duplicate probe handler body elision.
// That's because they're only dependent on the probe body, which is already
// "hashed" in above.
- if (tmp_probe_contents.count(oss.str()) == 0) // unique
+ if (session->unoptimized || tmp_probe_contents.count(oss.str()) == 0) // unique
{
tmp_probe_contents[oss.str()] = dp->name; // save it
// If an identical probe has already been emitted, just call that
// one.
- if (probe_contents.count(oss.str()) != 0)
+ if (!session->unoptimized && probe_contents.count(oss.str()) != 0)
{
string dupe = probe_contents[oss.str()];