On 16 January 2015 at 17:19, <fred.kon...@greensocs.com> wrote: > From: KONRAD Frederic <fred.kon...@greensocs.com> > > In order to have one TCGContext per thread and a single TBContext we have to > extract TBContext from TCGContext.
This seems a bit odd. It's not clear to me what the advantages are of having one TCGContext per thread but only a single TBContext (as opposed to either (1) having a single TCGContext and TBContext with locks protecting against multiple threads generating code at once, or (2) having each thread have its own TCGContext and TBContext and completely independent codegen). Maybe it would help if you sketched out your design in a little more detail in the cover letter, with emphasis on which data structures are going to be per-thread and which are going to be shared (and if so how shared). (Long term we would want to be able to have multiple TBContexts to support heterogenous systems where CPUs might be different architectures or have different views of physical memory...) thanks -- PMM