Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-12 Thread Jeff Law
On 8/9/19 7:05 AM, Martin Liška wrote: > On 8/9/19 2:38 PM, Martin Liška wrote: >> On 8/9/19 10:19 AM, Richard Biener wrote: >>> OK with that. I still think that making -flto use a jobserver if detected >>> (but _not_ use the number of CPU cores by default) makes >>> sense as an independent change

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-09 Thread Martin Liška
On 8/9/19 2:38 PM, Martin Liška wrote: > On 8/9/19 10:19 AM, Richard Biener wrote: >> OK with that. I still think that making -flto use a jobserver if detected >> (but _not_ use the number of CPU cores by default) makes >> sense as an independent change. > > In order to address that, I'm suggesti

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-09 Thread Martin Liška
On 8/9/19 10:19 AM, Richard Biener wrote: > OK with that. I still think that making -flto use a jobserver if detected > (but _not_ use the number of CPU cores by default) makes > sense as an independent change. In order to address that, I'm suggesting following patch that I've been testing. Mart

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-09 Thread Richard Biener
On Fri, Aug 9, 2019 at 10:11 AM Martin Liška wrote: > > I'm sending slightly updated version of the patch > where I allow -flto=auto in common_handle_option. +One can also use @option{-flto=auto} to either use GNU make's +job server mode to determine the number of parallel jobs, if available. +Or

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-09 Thread Martin Liška
I'm sending slightly updated version of the patch where I allow -flto=auto in common_handle_option. Martin >From cc04dfc9dbf2ed91a021093d1d27b81848ea726b Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 5 Aug 2019 06:44:25 +0200 Subject: [PATCH] Add -flto=auto option value. gcc/ChangeLog:

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-04 Thread Martin Liška
On 8/2/19 11:55 AM, Richard Biener wrote: > On Fri, Aug 2, 2019 at 11:19 AM Martin Liška wrote: >> >> On 8/2/19 11:15 AM, Jan Hubicka wrote: On Fri, Aug 2, 2019 at 10:50 AM Jakub Jelinek wrote: > > On Fri, Aug 02, 2019 at 10:47:10AM +0200, Martin Liška wrote: >>> Can you strace i

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-02 Thread Richard Biener
On Fri, Aug 2, 2019 at 11:19 AM Martin Liška wrote: > > On 8/2/19 11:15 AM, Jan Hubicka wrote: > >> On Fri, Aug 2, 2019 at 10:50 AM Jakub Jelinek wrote: > >>> > >>> On Fri, Aug 02, 2019 at 10:47:10AM +0200, Martin Liška wrote: > > Can you strace if other fds are opened and not closed in the s

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-02 Thread Martin Liška
On 8/2/19 11:15 AM, Jan Hubicka wrote: >> On Fri, Aug 2, 2019 at 10:50 AM Jakub Jelinek wrote: >>> >>> On Fri, Aug 02, 2019 at 10:47:10AM +0200, Martin Liška wrote: > Can you strace if other fds are opened and not closed in the spot you had > it > before? Advantage of doing it there

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-02 Thread Jan Hubicka
> On Fri, Aug 2, 2019 at 10:50 AM Jakub Jelinek wrote: > > > > On Fri, Aug 02, 2019 at 10:47:10AM +0200, Martin Liška wrote: > > > > Can you strace if other fds are opened and not closed in the spot you > > > > had it > > > > before? Advantage of doing it there is that it will not be done for >

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-02 Thread Jan Hubicka
> On Fri, Aug 2, 2019 at 10:50 AM Jakub Jelinek wrote: > > > > On Fri, Aug 02, 2019 at 10:47:10AM +0200, Martin Liška wrote: > > > > Can you strace if other fds are opened and not closed in the spot you > > > > had it > > > > before? Advantage of doing it there is that it will not be done for >

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-02 Thread Richard Biener
On Fri, Aug 2, 2019 at 10:50 AM Jakub Jelinek wrote: > > On Fri, Aug 02, 2019 at 10:47:10AM +0200, Martin Liška wrote: > > > Can you strace if other fds are opened and not closed in the spot you had > > > it > > > before? Advantage of doing it there is that it will not be done for all > > > the

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-02 Thread Jakub Jelinek
On Fri, Aug 02, 2019 at 10:47:10AM +0200, Martin Liška wrote: > > Can you strace if other fds are opened and not closed in the spot you had it > > before? Advantage of doing it there is that it will not be done for all the > > -E/-S/-c compilations when the linker is not spawned. > > I've used th

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-02 Thread Martin Liška
1 marxin users 64 Aug 2 10:33 2 -> /dev/pts/4 lrwx-- 1 marxin users 64 Aug 2 10:33 3 -> /dev/pts/2 dropping MAKEFLAGS in w -j16 --jobserver-auth=4,5 total 0 lrwx-- 1 marxin users 64 Aug 2 10:33 0 -> /dev/pts/4 l-wx-- 1 marxin users 64 Aug 2 10:33 1 -> /tmp/ccgExLq7 lr

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-02 Thread Jakub Jelinek
On Fri, Aug 02, 2019 at 08:30:47AM +0200, Martin Liška wrote: > On 8/1/19 4:41 PM, Jakub Jelinek wrote: > > On Thu, Aug 01, 2019 at 04:34:09PM +0200, Martin Liška wrote: > >> Ok, after deeper discussion with Honza, I would like to suggest the > >> original > >> patch that was about proper detectio

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-01 Thread Martin Liška
ere is no space between sscanf and (. Yep, I simplified that. Martin > > Jakub > >From 9f96e16a7798fd3b60fa9ec5b7a66748212146c4 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 1 Aug 2019 16:30:01 +0200 Subject: [PATCH] Properly detect working jobserver in gcc driver. gcc/C

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-01 Thread Jakub Jelinek
On Thu, Aug 01, 2019 at 04:34:09PM +0200, Martin Liška wrote: > Ok, after deeper discussion with Honza, I would like to suggest the original > patch that was about proper detection of jobserver. > > Can you please Jakub test the patch in your environment? Isn't this done too late (as in, doesn't

[PATCH] Properly detect working jobserver in gcc driver.

2019-08-01 Thread Martin Liška
9146784eb3f85e8b4547f2ab71c Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 1 Aug 2019 16:30:01 +0200 Subject: [PATCH] Properly detect working jobserver in gcc driver. gcc/ChangeLog: 2019-08-01 Martin Liska PR lto/91313 * gcc.c (driver::maybe_run_linker): Test whether jobserver is a