|
|
Created:
7 years, 6 months ago by asharif1 Modified:
7 years, 5 months ago CC:
blink-reviews, apavlov+blink_chromium.org, dglazkov+blink, eae+blinkwatch, darktears, bjanakiraman1, scottz Base URL:
svn://svn.chromium.org/blink/trunk Visibility:
Public. |
DescriptionWebKit: Add missing includes.
Not having these includes present gives a linker error when building
Chrome and WebKit with -fprofile-generate.
BUG=253985
TEST=USE="pgo_generate" emerge-$board chromeos-chrome works.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=153163
Patch Set 1 #
Total comments: 1
Patch Set 2 : Moved include to header file. #Patch Set 3 : Moved changes back to cpp file. #
Messages
Total messages: 17 (0 generated)
On 2013/06/25 17:24:09, asharif1 wrote: PTAL.
https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.cpp File Source/core/css/CSSRuleList.cpp (right): https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.c... Source/core/css/CSSRuleList.cpp:56: MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); Why does this compile without the include? If using this class requires including MemoryInstrumentationVector.h, should the header declaring this class include MIV.h?
On 2013/06/25 17:40:34, Nico wrote: > https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.cpp > File Source/core/css/CSSRuleList.cpp (right): > > https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.c... > Source/core/css/CSSRuleList.cpp:56: MemoryClassInfo info(memoryObjectInfo, this, > WebCoreMemoryTypes::CSS); > Why does this compile without the include? If using this class requires It actually fails to compile without the include with -fprofile-generate. I'm guessing for the regular build it works because the function call is optimized away for some reason. See: http://chromegw/i/chromeos/builders/lumpy%20pgo%20canary%20%28experimental%29... It fails to link when built with USE="pgo_generate". When built with -fprofile-generate, I ran: readelf -sW CSSRuleList.o | grep _ZN3WTF17reportMemoryUsageINS_6RefPtrIN7WebCore7CSSRuleEEELm0EEEvPKNS_6VectorIT_XT0_EEEPNS_16MemoryObjectInfoE 515: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _ZN3WTF17reportMemoryUsageINS_6RefPtrIN7WebCore7CSSRuleEEELm0EEEvPKNS_6VectorIT_XT0_EEEPNS_16MemoryObjectInfoE c++filt _ZN3WTF17reportMemoryUsageINS_6RefPtrIN7WebCore7CSSRuleEEELm0EEEvPKNS_6VectorIT_XT0_EEEPNS_16MemoryObjectInfoE void WTF::reportMemoryUsage<WTF::RefPtr<WebCore::CSSRule>, 0ul>(WTF::Vector<WTF::RefPtr<WebCore::CSSRule>, 0ul> const*, WTF::MemoryObjectInfo*) > including MemoryInstrumentationVector.h, should the header declaring this class > include MIV.h? Done in the next patchset, though I don't completely understand when to use <> vs "" for the includes. Some wtf includes use <> while others use "".
On 2013/06/25 17:51:30, asharif1 wrote: > On 2013/06/25 17:40:34, Nico wrote: > > > https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.cpp > > File Source/core/css/CSSRuleList.cpp (right): > > > > > https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.c... > > Source/core/css/CSSRuleList.cpp:56: MemoryClassInfo info(memoryObjectInfo, > this, > > WebCoreMemoryTypes::CSS); > > Why does this compile without the include? If using this class requires > > It actually fails to compile without the include with -fprofile-generate. I'm > guessing for the regular build it works because the function call is optimized > away for some reason. > > See: > http://chromegw/i/chromeos/builders/lumpy%2520pgo%2520canary%2520%2528experim... > > It fails to link when built with USE="pgo_generate". > > When built with -fprofile-generate, I ran: > > readelf -sW CSSRuleList.o | grep > _ZN3WTF17reportMemoryUsageINS_6RefPtrIN7WebCore7CSSRuleEEELm0EEEvPKNS_6VectorIT_XT0_EEEPNS_16MemoryObjectInfoE > > 515: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND > _ZN3WTF17reportMemoryUsageINS_6RefPtrIN7WebCore7CSSRuleEEELm0EEEvPKNS_6VectorIT_XT0_EEEPNS_16MemoryObjectInfoE > > c++filt > _ZN3WTF17reportMemoryUsageINS_6RefPtrIN7WebCore7CSSRuleEEELm0EEEvPKNS_6VectorIT_XT0_EEEPNS_16MemoryObjectInfoE > void WTF::reportMemoryUsage<WTF::RefPtr<WebCore::CSSRule>, > 0ul>(WTF::Vector<WTF::RefPtr<WebCore::CSSRule>, 0ul> const*, > WTF::MemoryObjectInfo*) > > > > including MemoryInstrumentationVector.h, should the header declaring this > class > > include MIV.h? > > Done in the next patchset, though I don't completely understand when to use <> > vs "" for the includes. Some wtf includes use <> while others use "". I meant move it to the header that requires including MIV.h (probably MemoryInstrumentationVector.h?), not to the .h of the cc you touched. Always use "", <> is deprecated for wtf includes.
+yurys for the memory instrumentation bits
On 2013/06/25 18:12:22, Nico wrote: > On 2013/06/25 17:51:30, asharif1 wrote: > > On 2013/06/25 17:40:34, Nico wrote: > > > > > > https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.cpp > > > File Source/core/css/CSSRuleList.cpp (right): > > > > > > > > > https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.c... > > > Source/core/css/CSSRuleList.cpp:56: MemoryClassInfo info(memoryObjectInfo, > > this, > > > WebCoreMemoryTypes::CSS); > > > Why does this compile without the include? If using this class requires > > > > It actually fails to compile without the include with -fprofile-generate. I'm > > guessing for the regular build it works because the function call is optimized > > away for some reason. > > > > See: > > > http://chromegw/i/chromeos/builders/lumpy%252520pgo%252520canary%252520%25252... > > > > It fails to link when built with USE="pgo_generate". > > > > When built with -fprofile-generate, I ran: > > > > readelf -sW CSSRuleList.o | grep > > > _ZN3WTF17reportMemoryUsageINS_6RefPtrIN7WebCore7CSSRuleEEELm0EEEvPKNS_6VectorIT_XT0_EEEPNS_16MemoryObjectInfoE > > > > 515: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND > > > _ZN3WTF17reportMemoryUsageINS_6RefPtrIN7WebCore7CSSRuleEEELm0EEEvPKNS_6VectorIT_XT0_EEEPNS_16MemoryObjectInfoE > > > > c++filt > > > _ZN3WTF17reportMemoryUsageINS_6RefPtrIN7WebCore7CSSRuleEEELm0EEEvPKNS_6VectorIT_XT0_EEEPNS_16MemoryObjectInfoE > > void WTF::reportMemoryUsage<WTF::RefPtr<WebCore::CSSRule>, > > 0ul>(WTF::Vector<WTF::RefPtr<WebCore::CSSRule>, 0ul> const*, > > WTF::MemoryObjectInfo*) > > > > > > > including MemoryInstrumentationVector.h, should the header declaring this > > class > > > include MIV.h? > > > > Done in the next patchset, though I don't completely understand when to use <> > > vs "" for the includes. Some wtf includes use <> while others use "". > > I meant move it to the header that requires including MIV.h (probably > MemoryInstrumentationVector.h?), not to the .h of the cc you touched. I still don't understand where I should move the includes to. The include file that's missing is MemoryInstrumentationVector.h. Where should I add this include? I moved it to the cpp files for now. > > Always use "", <> is deprecated for wtf includes.
On 2013/06/25 18:41:09, asharif1 wrote: > On 2013/06/25 18:12:22, Nico wrote: > > On 2013/06/25 17:51:30, asharif1 wrote: > > > On 2013/06/25 17:40:34, Nico wrote: > > > > > > > > > > https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.cpp > > > > File Source/core/css/CSSRuleList.cpp (right): > > > > > > > > > > > > > > https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.c... > > > > Source/core/css/CSSRuleList.cpp:56: MemoryClassInfo info(memoryObjectInfo, > > > this, > > > > WebCoreMemoryTypes::CSS); > > > > Why does this compile without the include? If using this class requires > > > > > > It actually fails to compile without the include with -fprofile-generate. > I'm > > > guessing for the regular build it works because the function call is > optimized > > > away for some reason. > > > > > > See: > > > > > > http://chromegw/i/chromeos/builders/lumpy%25252520pgo%25252520canary%25252520... > > > > > > It fails to link when built with USE="pgo_generate". > > > > > > When built with -fprofile-generate, I ran: > > > > > > readelf -sW CSSRuleList.o | grep > > > > > > _ZN3WTF17reportMemoryUsageINS_6RefPtrIN7WebCore7CSSRuleEEELm0EEEvPKNS_6VectorIT_XT0_EEEPNS_16MemoryObjectInfoE > > > > > > 515: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND > > > > > > _ZN3WTF17reportMemoryUsageINS_6RefPtrIN7WebCore7CSSRuleEEELm0EEEvPKNS_6VectorIT_XT0_EEEPNS_16MemoryObjectInfoE > > > > > > c++filt > > > > > > _ZN3WTF17reportMemoryUsageINS_6RefPtrIN7WebCore7CSSRuleEEELm0EEEvPKNS_6VectorIT_XT0_EEEPNS_16MemoryObjectInfoE > > > void WTF::reportMemoryUsage<WTF::RefPtr<WebCore::CSSRule>, > > > 0ul>(WTF::Vector<WTF::RefPtr<WebCore::CSSRule>, 0ul> const*, > > > WTF::MemoryObjectInfo*) > > > > > > > > > > including MemoryInstrumentationVector.h, should the header declaring this > > > class > > > > include MIV.h? > > > > > > Done in the next patchset, though I don't completely understand when to use > <> > > > vs "" for the includes. Some wtf includes use <> while others use "". > > > > I meant move it to the header that requires including MIV.h (probably > > MemoryInstrumentationVector.h?), not to the .h of the cc you touched. > > I still don't understand where I should move the includes to. > > The include file that's missing is MemoryInstrumentationVector.h. Where should I > add this include? > > I moved it to the cpp files for now. > > > > > Always use "", <> is deprecated for wtf includes. thakis/timloh, ping.
I was hoping yurys would take a look. +loislo for redundancy :-) On Wed, Jun 26, 2013 at 12:43 PM, <asharif@chromium.org> wrote: > On 2013/06/25 18:41:09, asharif1 wrote: > >> On 2013/06/25 18:12:22, Nico wrote: >> > On 2013/06/25 17:51:30, asharif1 wrote: >> > > On 2013/06/25 17:40:34, Nico wrote: >> > > > >> > > >> > >> > > https://codereview.chromium.**org/17707003/diff/1/Source/** > core/css/CSSRuleList.cpp<https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.cpp> > >> > > > File Source/core/css/CSSRuleList.**cpp (right): >> > > > >> > > > >> > > >> > >> > > https://codereview.chromium.**org/17707003/diff/1/Source/** > core/css/CSSRuleList.cpp#**newcode56<https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.cpp#newcode56> > >> > > > Source/core/css/CSSRuleList.**cpp:56: MemoryClassInfo >> > info(memoryObjectInfo, > >> > > this, >> > > > WebCoreMemoryTypes::CSS); >> > > > Why does this compile without the include? If using this class >> requires >> > > >> > > It actually fails to compile without the include with >> -fprofile-generate. >> I'm >> > > guessing for the regular build it works because the function call is >> optimized >> > > away for some reason. >> > > >> > > See: >> > > >> > >> > > http://chromegw/i/chromeos/**builders/lumpy%25252520pgo%** > 25252520canary%25252520%**25252528experimental%25252529/** > builds/210/steps/**BuildPackages%25252520%**2525255Bpgo_generate%2525255D% > **25252520%2525255Blumpy%**2525255D/logs/stdio<http://chromegw/i/chromeos/builders/lumpy%25252520pgo%25252520canary%25252520%25252528experimental%25252529/builds/210/steps/BuildPackages%25252520%2525255Bpgo_generate%2525255D%25252520%2525255Blumpy%2525255D/logs/stdio> > > > > >> > > It fails to link when built with USE="pgo_generate". >> > > >> > > When built with -fprofile-generate, I ran: >> > > >> > > readelf -sW CSSRuleList.o | grep >> > > >> > >> > > _ZN3WTF17reportMemoryUsageINS_**6RefPtrIN7WebCore7CSSRuleEEELm** > 0EEEvPKNS_6VectorIT_XT0_**EEEPNS_16MemoryObjectInfoE > >> > > >> > > 515: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND >> > > >> > >> > > _ZN3WTF17reportMemoryUsageINS_**6RefPtrIN7WebCore7CSSRuleEEELm** > 0EEEvPKNS_6VectorIT_XT0_**EEEPNS_16MemoryObjectInfoE > >> > > >> > > c++filt >> > > >> > >> > > _ZN3WTF17reportMemoryUsageINS_**6RefPtrIN7WebCore7CSSRuleEEELm** > 0EEEvPKNS_6VectorIT_XT0_**EEEPNS_16MemoryObjectInfoE > >> > > void WTF::reportMemoryUsage<WTF::**RefPtr<WebCore::CSSRule>, >> > > 0ul>(WTF::Vector<WTF::RefPtr<**WebCore::CSSRule>, 0ul> const*, >> > > WTF::MemoryObjectInfo*) >> > > >> > > >> > > > including MemoryInstrumentationVector.h, should the header declaring >> > this > >> > > class >> > > > include MIV.h? >> > > >> > > Done in the next patchset, though I don't completely understand when >> to >> > use > >> <> >> > > vs "" for the includes. Some wtf includes use <> while others use "". >> > >> > I meant move it to the header that requires including MIV.h (probably >> > MemoryInstrumentationVector.h?**), not to the .h of the cc you touched. >> > > I still don't understand where I should move the includes to. >> > > The include file that's missing is MemoryInstrumentationVector.h. Where >> should >> > I > >> add this include? >> > > I moved it to the cpp files for now. >> > > > >> > Always use "", <> is deprecated for wtf includes. >> > > thakis/timloh, ping. > > https://codereview.chromium.**org/17707003/<https://codereview.chromium.org/1... >
On 2013/06/26 19:43:21, asharif1 wrote: > thakis/timloh, ping. This seems fine to me (I mistakenly removed the include in one of my remove unused includes patches). There's a link time guard which makes us fail to link if we forget the include, but possibly we aren't using this particular reportMemoryUsage function so it gets optimised away? It looks like we should have these includes in here since we're reporting usage on vectors. Sorry for breaking your build. lgtm (I don't have owners).
lgtm
lgtm stamp
lgtm On 2013/06/26 19:44:45, Nico wrote: > I was hoping yurys would take a look. +loislo for redundancy :-) > > > On Wed, Jun 26, 2013 at 12:43 PM, <mailto:asharif@chromium.org> wrote: > > > On 2013/06/25 18:41:09, asharif1 wrote: > > > >> On 2013/06/25 18:12:22, Nico wrote: > >> > On 2013/06/25 17:51:30, asharif1 wrote: > >> > > On 2013/06/25 17:40:34, Nico wrote: > >> > > > > >> > > > >> > > >> > > > > https://codereview.chromium.**org/17707003/diff/1/Source/** > > > core/css/CSSRuleList.cpp<https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.cpp> > > > >> > > > File Source/core/css/CSSRuleList.**cpp (right): > >> > > > > >> > > > > >> > > > >> > > >> > > > > https://codereview.chromium.**org/17707003/diff/1/Source/** > > > core/css/CSSRuleList.cpp#**newcode56<https://codereview.chromium.org/17707003/diff/1/Source/core/css/CSSRuleList.cpp#newcode56> > > > >> > > > Source/core/css/CSSRuleList.**cpp:56: MemoryClassInfo > >> > > info(memoryObjectInfo, > > > >> > > this, > >> > > > WebCoreMemoryTypes::CSS); > >> > > > Why does this compile without the include? If using this class > >> requires > >> > > > >> > > It actually fails to compile without the include with > >> -fprofile-generate. > >> I'm > >> > > guessing for the regular build it works because the function call is > >> optimized > >> > > away for some reason. > >> > > > >> > > See: > >> > > > >> > > >> > > > > http://chromegw/i/chromeos/**builders/lumpy%2525252520pgo%25** > > 25252520canary%25252520%**25252528experimental%25252529/** > > builds/210/steps/**BuildPackages%25252520%**2525255Bpgo_generate%2525255D% > > > **25252520%2525255Blumpy%**2525255D/logs/stdio<http://chromegw/i/chromeos/builders/lumpy%25252520pgo%25252520canary%25252520%25252528experimental%25252529/builds/210/steps/BuildPackages%25252520%2525255Bpgo_generate%2525255D%25252520%2525255Blumpy%2525255D/logs/stdio> > > > > > > > >> > > It fails to link when built with USE="pgo_generate". > >> > > > >> > > When built with -fprofile-generate, I ran: > >> > > > >> > > readelf -sW CSSRuleList.o | grep > >> > > > >> > > >> > > > > _ZN3WTF17reportMemoryUsageINS_**6RefPtrIN7WebCore7CSSRuleEEELm** > > 0EEEvPKNS_6VectorIT_XT0_**EEEPNS_16MemoryObjectInfoE > > > >> > > > >> > > 515: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND > >> > > > >> > > >> > > > > _ZN3WTF17reportMemoryUsageINS_**6RefPtrIN7WebCore7CSSRuleEEELm** > > 0EEEvPKNS_6VectorIT_XT0_**EEEPNS_16MemoryObjectInfoE > > > >> > > > >> > > c++filt > >> > > > >> > > >> > > > > _ZN3WTF17reportMemoryUsageINS_**6RefPtrIN7WebCore7CSSRuleEEELm** > > 0EEEvPKNS_6VectorIT_XT0_**EEEPNS_16MemoryObjectInfoE > > > >> > > void WTF::reportMemoryUsage<WTF::**RefPtr<WebCore::CSSRule>, > >> > > 0ul>(WTF::Vector<WTF::RefPtr<**WebCore::CSSRule>, 0ul> const*, > >> > > WTF::MemoryObjectInfo*) > >> > > > >> > > > >> > > > including MemoryInstrumentationVector.h, should the header declaring > >> > > this > > > >> > > class > >> > > > include MIV.h? > >> > > > >> > > Done in the next patchset, though I don't completely understand when > >> to > >> > > use > > > >> <> > >> > > vs "" for the includes. Some wtf includes use <> while others use "". > >> > > >> > I meant move it to the header that requires including MIV.h (probably > >> > MemoryInstrumentationVector.h?**), not to the .h of the cc you touched. > >> > > > > I still don't understand where I should move the includes to. > >> > > > > The include file that's missing is MemoryInstrumentationVector.h. Where > >> should > >> > > I > > > >> add this include? > >> > > > > I moved it to the cpp files for now. > >> > > > > > > >> > Always use "", <> is deprecated for wtf includes. > >> > > > > thakis/timloh, ping. > > > > > https://codereview.chromium.**org/17707003/%3Chttps://codereview.chromium.org...> > >
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asharif@chromium.org/17707003/13001
Retried try job too often on win_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_layout...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asharif@chromium.org/17707003/13001
Message was sent while issue was closed.
Change committed as 153163 |