That much I understand. But it's cc1 that is in two processes, and gcc -v only 
shows it being invoked once. Finally the output on stderr is only from one of 
the two processes.

Remove the finish type register and suddenly cc1 runs (as expected) and the 
logfiles PID and the console PID match once again.

(To clarify terminology: gcc app being the driver here? I didn't think the 
plugins were loaded in the 'gcc' driver? Strictly from the compiler?)
Sent via BlackBerry by AT&T

-----Original Message-----
From: Diego Novillo <dnovi...@google.com>
Date: Wed, 25 Apr 2012 07:25:51 
To: Brett Foster<fost...@edgeandvertex.org>
Cc: <gcc@gcc.gnu.org>
Subject: Re: GCC Plugins - CC1 - Multiple processes on PLUGIN_FINISH_TYPE

On 4/25/12 1:37 AM, Brett Foster wrote:

> When I add:
>
>       register_callback (BaseName, PLUGIN_FINISH_TYPE, CinsGcc_CB_Type, NULL);
>
> The plugin appears to be loaded by a 2nd process, initialized, and
> provided with what appears to be much the same data (at least from my
> view).

That's correct.  All plugin events are emitted from 
cc1/cc1plus/f951/jc1/lto1.  These binaries are the actual compiler. 
'gcc' is a driver process that calls the compiler, the assembler, the 
linker, etc.

> Other plugin events do not appear to cause this behaviour.

They should.  All events are generated from the compiler, not the driver.


Diego.

Reply via email to