Skip to content

[coverage] Automatic merger for LLVM profile data #1126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
Feb 3, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
eb27ca1
[coverage] Initial commit of profdata merging worker
Jan 25, 2016
2cf852f
[coverage] Cleaned up profdata merge worker and added debug flag
Jan 26, 2016
c6c0b3d
[coverage] Removed explicit swift-%p.profraw arguments from CMake com…
Jan 26, 2016
32fda29
[coverage] Made subclass of list test format so we can hook into each…
Jan 26, 2016
a41ec1a
[coverage] Cleaned up argument parsing for swift coverage, and hooked…
Jan 26, 2016
78612e5
[coverage] Added before_test and after_test hooks in SwiftTest
Jan 26, 2016
03964cc
[coverage] Simplified before_test and after_test
Jan 26, 2016
3ea61fb
[coverage] Fixed runtime error in lit.cfg
Jan 27, 2016
9eb729c
[coverage] Reworked CMake invocation for coverage testing given there…
Jan 27, 2016
fb6ee1a
[coverage] Added argument parsing to profdata merge worker and cleane…
Jan 27, 2016
259af4d
[coverage] Cleaned up target generation and lit merging code
Jan 27, 2016
c83fb1c
[coverage] Fixed CMake invocation of profdata merge worker
Jan 27, 2016
1b30a49
[coverage] Added license header to profdata_merge_worker and added ex…
Jan 27, 2016
5a2a809
[coverage] Removed printing in CMake
Jan 28, 2016
9fccf50
[coverage] Fixed conflicts with master
Jan 28, 2016
bb8160a
[coverage] Declared SWIFT_ANALYZE_CODE_COVERAGE in CMakeLists and doc…
Jan 28, 2016
b4c7678
[coverage] Documented modes for SWIFT_ANALYZE_CODE_COVERAGE and added…
Jan 28, 2016
e997fc3
[coverage] Changed 'none' to 'false' for coverage default
Jan 28, 2016
44be500
[coverage] Changed back to old coverage check in CMakeLists.txt files
Jan 28, 2016
7608f88
[coverage] Removed print in built script
Jan 28, 2016
b1d6e17
[coverage] Added coverage_mode definitions in validation test and Uni…
Jan 28, 2016
0e6f798
[coverage] Made sure code coverage doesn't rename the ninja build dir…
Jan 29, 2016
e9d009e
[coverage] Merged and fixed conflicts
Jan 29, 2016
44e44ad
Merged upstream master into profdata-merge
Jan 29, 2016
b8a2249
Merged upstream master into profdata-merge
Jan 29, 2016
96d4261
[coverage] Made some stylistic changes for CMake consistency
Feb 1, 2016
1777c20
[coverage] Fixed indentation in CMake
Feb 1, 2016
d41bd9a
[coverage] Made SWIFT_ANALYZE_CODE_COVERAGE a string option instead o…
Feb 1, 2016
f99fd75
[coverage] Converted global non-constants to explicitly passed parame…
Feb 1, 2016
d7eff48
[coverage] Converted to print function
Feb 1, 2016
693d7da
[coverage] Converted to explicit super in lit.cfg
Feb 1, 2016
6572267
[coverage] Split profdata_merge_worker.py into separate files within …
Feb 1, 2016
dea48f4
[coverage] Fixed missing import
Feb 1, 2016
eb9fb9c
[coverage] Used gettempdir() instead of hard-coding /tmp
Feb 2, 2016
45df849
[coverage] Explicit super in process.py
Feb 2, 2016
873af8e
[coverage] Fail gracefully on non-Darwin
Feb 2, 2016
f713042
[coverage] Added license header to config.py
Feb 2, 2016
c75fa76
[coverage] Added README for the profdata module
Feb 2, 2016
6ec0dd3
[coverage] Added log file output to profdata merger
Feb 2, 2016
cf30318
[coverage] Converted to python standard logging framework
Feb 2, 2016
13bae93
[coverage] pep8
Feb 2, 2016
2b22040
[coverage] Removed unused imports
Feb 2, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[coverage] Fixed indentation in CMake
  • Loading branch information
Harlan Haskins committed Feb 1, 2016
commit 1777c20affafcd143ba371888e3393f8a079749b
6 changes: 3 additions & 3 deletions tools/SourceKit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ macro(add_sourcekit_executable name)
PROPERTIES
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change this invocation to be set_property(TARGET "..." APPEND_STRING PROPERTY LINK_FLAGS)? Then you won't need to duplicate the code coverage flags below?

LINK_FLAGS "-Wl,-exported_symbol,_main")

if(SWIFT_ANALYZE_CODE_COVERAGE)
set_property(TARGET "${name}" APPEND_STRING PROPERTY
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping")
if(SWIFT_ANALYZE_CODE_COVERAGE)
set_property(TARGET "${name}" APPEND_STRING PROPERTY
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping")
endif()
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion tools/SourceKit/tools/complete-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

if(SWIFT_ANALYZE_CODE_COVERAGE)
set_property(TARGET complete-test APPEND_STRING PROPERTY
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping")
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping")
endif()
endif()

Expand Down
4 changes: 2 additions & 2 deletions tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
PROPERTIES
LINK_FLAGS "-Wl,-rpath -Wl,@executable_path/../lib")

if(SWIFT_ANALYZE_CODE_COVERAGE)
if(SWIFT_ANALYZE_CODE_COVERAGE)
set_property(TARGET sourcekitd-repl APPEND_STRING PROPERTY
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping")
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping")
endif()
endif()

Expand Down
4 changes: 2 additions & 2 deletions tools/SourceKit/tools/sourcekitd-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
PROPERTIES
LINK_FLAGS "-Wl,-rpath -Wl,@executable_path/../lib")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if you change this to append to LINK_FLAGS, then you won't need to duplicate appending -fprofile-instr-generate below -- it will come from AddSwift.cmake. Because this call to set_target_properties does not append, it overwrites the flags set by AddSwift.cmake.


if(SWIFT_ANALYZE_CODE_COVERAGE)
if(SWIFT_ANALYZE_CODE_COVERAGE)
set_property(TARGET sourcekitd-test APPEND_STRING PROPERTY
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping")
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping")
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function(add_swift_unittest test_dirname)

if(SWIFT_ANALYZE_CODE_COVERAGE)
set_property(TARGET "${test_dirname}" APPEND_STRING PROPERTY
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping")
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping")
endif()
endif()
endfunction()
Expand Down