delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/02/01/04:04:57

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=WDl22ib
xvDSEBFVkxXiLbLcihPIMSShCXkZXaSH8eB74PTwa+JXScgBbcHoLX2Zhk9SuAy0
24Xvxj5DX6XwwG0dHHXEsKpH2N60wXARqXFy2W3/fEwIG4RfX0JvbLMa1la1AnZY
RRCrpBH+VkEaBhIn33HN28ZZelbG2ymgwHz0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=oY2m9ICGvzaMs
H//JfIUphVpgO4=; b=wkIRGTJCBGY3Dy1xNojRtiQr1gp4F4WgdxN2rDdR5nTHi
hDEc+QlQgDV1Yw1W97JsQf9jRkkHi23N9LwDojQJsi8+AHNrHGWG6CfZBBt15QQn
1yn8wjiCGAwt8vwvuftpKbwPxr8Etv5yhcogYJ23RYnnfm24NnALtgU4S77rHc=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=tao, magnus, block_hvac_unittestcc, procmon
X-HELO: mail-qt0-f182.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=zos1FnYZEE+WMaPzx78gqa/m8Ci0gvIhuP/AlSZ93zU=; b=hgiFyUY7Q4hV9Lwth/OEVM4mr43Q6Aryh+wmf/3UMQdJNWu6s2xhV9OO6Jv5vIjwC2 A+f8+Azs5jGVuAveCtT5g3zXBLG8NAADoLAnZ8ihN1KDj8bfFTU6fMOwp2qngx1XgvQS 9IbKORZdOo7Z1wJr63YpiGkubIZes0EJ3PsLaw3eiQKys0HQB1h5w6YsqrkFNmvdYfCd lu4r1m54Ojpc05i5r2jEiDlVc4XAnPeVpA5PKTyXmU0NziEfz4xVybMDFXE4cV4w68Hk 4UQLnWIvigUD1TDJAHObYEDk+0HGmxjZkw+QpyovyNAe1LFqybBLksXynBuylALIZJOV UDgw==
X-Gm-Message-State: APf1xPC0xRrqdZfNtLwZMMIxCGyPNuOewlCQU7nxZIC/qNWX7W/yfsVK +3zfVMwS6Ubp0oCVKW2w6aX5bio2OVq7sSSq7wwAJg==
X-Google-Smtp-Source: AH8x227/WGS9oKhz118PJBUVphGHsD9Vm9SgsCAdI4EeC2Is6irlqtW+0vegawi7WJAVrcxnK12fY5lUDa1484+o5K8=
X-Received: by 10.200.18.202 with SMTP id b10mr630041qtj.152.1517475879381; Thu, 01 Feb 2018 01:04:39 -0800 (PST)
MIME-Version: 1.0
In-Reply-To: <CAP-WjibSr5rB6iN5b86Ndr0u4-onihZf=JApEqKOG3EY4+8CRA@mail.gmail.com>
References: <CAP-WjibSr5rB6iN5b86Ndr0u4-onihZf=JApEqKOG3EY4+8CRA AT mail DOT gmail DOT com>
From: Csaba Raduly <rcsaba AT gmail DOT com>
Date: Thu, 1 Feb 2018 10:04:38 +0100
Message-ID: <CAEhDDbCGmRwJqRJ=9aCaA-55v0ngqS3iHwHZb_qVVYuzt3f=Ew@mail.gmail.com>
Subject: Re: Extremely slow compilation of C++ because of cc1plus does bad systemcalls
To: cygwin list <cygwin AT cygwin DOT com>

Hi Magnus,


On Thu, Feb 1, 2018 at 8:45 AM, Magnus Persson  wrote:
> When compiling a very small and simple C++ program (which took 6
> seconds), i profiled the execution. cc1plus was speding a lot of time
> trying to create .exe-files AND .lnk-files.
>
> This was the command-line:
> g++ -c -O0 -DGTEST_DONT_DEFINE_FAIL  -std=gnu++14 -Iw64
> -Icommon/freertos/include  -Iw64/config/ -Icommon -Icommon/dali
> -Icommon/debug -Icommon/config  -isystem ../Tools/googletest/include
> -isystem ../Tools/googlemock/include -DUNITTEST -g -Wall -Werror
> -pthread  unittest/block_hvac_unittest.cc -o
> obj_unit_linux/unittest/block_hvac_unittest.o
>
> I used procmon to capture all system-calls done. This is a part of
> what happened:
> (search for .exe  AND .lnk)
> Why does the preprocessor try to create these files (my command is
> just trying to compile (no linking)) ?
>
(snip)
> 08:25:49.3882166 cc1plus.exe 7256 CreateFile
> C:\cygwin64\lib\gcc\x86_64-w64-mingw32\6.4.0\include\c++\backward\clwbintrin.h.lnk
> NAME NOT FOUND Desired Access: Read EA, Read Attributes, Read Control,
> Disposition: Open, Options: Open Reparse Point, Attributes: n/a,
> ShareMode: Read, Write, Delete, AllocationSize: n/a
> 08:25:49.3882946 cc1plus.exe 7256 CreateFile
> C:\cygwin64\lib\gcc\x86_64-w64-mingw32\6.4.0\include\c++\backward\clwbintrin.h.exe.lnk
> NAME NOT FOUND Desired Access: Read EA, Read Attributes, Read Control,
> Disposition: Open, Options: Open Reparse Point, Attributes: n/a,
> ShareMode: Read, Write, Delete, AllocationSize: n/a


https://msdn.microsoft.com/en-us/library/windows/desktop/aa363874(v=vs.85).aspx
 (Creating and Opening Files) says

"The CreateFile function can create a new file or open an existing file. "


The options specified ( Desired Access: Read EA, Read Attributes, Read
Control, Disposition: Open, Options: Open Reparse Point ) suggest that
the compiler is trying to read, or is checking the existence of these
files.

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019