Re: [PATCH] Linux Kernel Markers 0.5 for Linux 2.6.17 (with probe management)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ingo Molnar wrote:
let me qualify that: parameters must be prepared there too - but no actual function call inserted. (at most a NOP inserted). The register filling doesnt even have to be function-calling-convention compliant - that makes the symbolic probe almost zero-impact to register allocation/scheduling, the only thing it should ensure is that the parameters that are annotated to be available in register, stack or memory _somewhere_. (i.e. not hidden or destroyed at that point by gcc) Does a simple asm() that takes read-only parameters but only adds a NOP achieve this result?

Do you mean using the asm to make sure gcc puts a reference to a variable into the DWARF info, or some other way of encoding the value locations?

Hm, another problem. If the mark is in a loop, and gcc decides to unroll the loop, then you'll probably only get a mark in one iteration of the loop (or 1/Nth of the iterations). Or worse, assembler errors. The only way I can see to deal with this is to not use symbols, but put records in a special section. That way, if the asm() inserting them gets duplicated, you'll get duplicate records in the marker section.

I guess you'd get a similar problem with markers inserted in inlined functions.

(How does gdb deal with breakpoints in unrolled loops?)

   J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux