On Mon, 17 Jan 2022 18:11:38 +0200 Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx> wrote: > > Hmm, I don't remember in our conversations. Did we say we would have more > > than one string section? Or allow it to be broken up? How do offsets work > > in such cases? > > > > I was thinking that we could simply mmap the string section, but that won't > > work if there's more than one. > > > > The first implementation was with a single string section at the end > of the file. But when I tested that design with the trace-cmd > guest-host tracing, I realized it is impossible to work without major > changes in the host-guest protocol. The problem is that in the current > host-guest tracing logic, part of the guest metadata file is written > in the guest context, part in the host context. Each of these parts > can put strings in the string section. That will change the way guest > metadata is written. That's why decided to use multiple string > sections in the file. On file read the strings from all sections are > stored into one memory block, and string offset is the offset in that > block. As these sections are compressed usually, simple mmap will not > work even in case of single section. OK, then we'll just keep it as is. Thanks, -- Steve