first a minor bug: it seems the units of /debug/tracing/trace_entriesis different for read and write. This is confusing for the users, sinceI can't say "if you have problems, double it". If I read from itsomething like 16422, then write back 16422, next I read 214. I can'trecall the exact numbers, but the difference really is two orders ofmagnitude. I have 1 GB RAM in this box, so that shouldn't be an issue.

My other problem is with trace_pipe. It is again making 'cat' quit tooearly. The condition triggered is if (!tracer_enabled && iter->pos) {in tracing_read_pipe(), and it is followed by triggering /* stop when tracing is finished */ if (trace_empty(iter)) {and then sret=0, so read returns 0 and 'cat' exits.

Now, I am trying my mmiotrace marker patches, but as far as I can tell,nothing I modified is the reason for this. I didn't yet explicitly testfor it, though. I'll send these patches after I hear from Frederic.

The cat-quit problem is not a constant state. After boot, I could playwith my markers and testmmiotrace without cat quitting. Then somethinghappens, and cat starts the quitting behaviour, and won't get to normalby disabling and enabling mmiotrace.

I have a couple of wild guesses of what might be related:- ring buffer wrap-around- ring buffer overflow (at first try I hit these, the second tryafter putting debug-pr_info's in place I don't hit this)- ring buffer resize (after playing with trace_entries, cat-quitproblem was present, though it might have been present before)

After viewing the git history, I have some more guesses, mainlyrelated to setting tracer_enabled to 0.- commit 2b1bce1787700768cbc87c8509851c6f49d252dcI don't see where tracer_enabled would be set to 1, whenmmiotrace is enabled. It used to default to 1 and mmiotrace was happy.- __tracing_open() sets it to 0 (not called for the pipe)- tracing_release() sets it to 1- tracing_ctrl_write() toggles it- tracing_read_pipe() tests it- tracer_alloc_buffers() uses itAnd other tracers seem to use it a lot.

Mmiotrace does use the tracer::ctrl_update hook, and allow/disallowcalls to __trace_mmiotrace_{rw,map}() via enabling/disabling the wholemmiotrace core. Is this not enough, or is it inappropriate?

It seems tracer_enabled is used by the trace framework itself toenable/disable... what? Hmm, maybe nothing I care about.