Commit Graph

124 Commits

Author SHA1 Message Date
Alexander Shabalin edf05b69ac [K/N][performance] Fix build 2024-02-26 18:06:44 +00:00
Yahor Berdnikau 6b19b8b9d0 [Repo] Don't use kotlinOptions in repo build scripts
^KT-63419 In Progress
2024-02-22 14:48:10 +00:00
Ilya Gorbunov d2aae67e03 Replace kotlin-test project dependencies in the project
Use dependency helper function that chooses whether to take them
from the bootstrap repository or from a configuration of kotlin-test

KT-61969
2023-12-13 15:40:25 +00:00
Pavel Punegov 7398f9e4e0 [K/N][perf] Return doLast
This fixes failures in performance builds caused by the KT-MR-13291 "Update Gradle to 8.4"
doLast { } block here is necessary as soon as it should be run during the task execution, while without it is a configuration time. Performance builds invoke Gradle several times with different tasks and parameters. The change in the mentioned MR made one of the invocations remove the nativeReports.json file produced earlier.

Merge-request: KT-MR-13496
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-12-13 13:35:53 +00:00
Alexander.Likhachev a19bd2ed2e [Build] Migrate most of the build logic from Project.buildDir usage
It's going to be deprecated in Gradle 8.3

There's currently no way to pass a `org.gradle.api.provider.Provider` to the JavaExec.systemProperty or Test.systemProperty. There's a workaround using `org.gradle.process.CommandLineArgumentProvider`, but I intentionally don't rework these calls as Gradle is going to allow passing providers to configure system properties: https://github.com/gradle/gradle/issues/12247#issuecomment-1568427242
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Pavel Punegov adf4f823ae [K/N][perf] Fix the fallback framework path in swift performance
After bootstrap update and the change that added /usr subdir to
absoluteTargetToolchain


Merge-request: KT-MR-13212
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-11-23 18:37:18 +00:00
Pavel Punegov 1384377fec [K/N][perf] Fixup target toolchain path for swift compilation
Fix swiftc path in the performance infrastructure. It has a separate
plugin to regular native-build-tools.

This fixes failures caused by the 3aeca1956e.
See also MR-KT-12948


Merge-request: KT-MR-13130
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-11-20 22:22:08 +00:00
Dmitriy Dolovov c13c917a8a [Native] Don't use KLIB repositories in K/N build infra
Don't pass KLIB repositories via '-repo' or '-r' compiler parameters.

^KT-61098
2023-11-15 19:38:25 +00:00
Troels Bjerre Lund d62dbbb1bd Simplify K/N ArrayList
This commit specializes the existing Kotlin/Native stdlib ArrayList into
two subclasses:
 * ArrayList
 * ArraySubList
This avoids repeatedly checking whether a basic ArrayList is created as a
sublist of another ArrayList.

In the iterators, checkForComodification is marked for inlining, since
this significantly improves iterations performance.

A number of benchmarks are added to the native ring benchmark suite, to
test whether the changed runtime type of ArrayList.subList(...) has an
impact.
2023-11-14 09:47:25 +00:00
Svyatoslav Scherbina bc41309c31 Revert "Native: enable K2 for benchmarks in performance/"
This workaround is not needed anymore -- bootstrap KGP is now K2.

This reverts commit 4672727bd6.
2023-11-13 08:38:24 +00:00
Pavel Punegov 707482e738 [K/N][perf] Cleanup build scripts
Remove hack with including sources directories.
shared project directory was removed from native and merged with utils.
Also, remove native/utils inclusion. Bootstrap version is used instead.
2023-11-10 18:25:04 +00:00
Aleksei.Glushko beeb016a9f [K/N] Test runtime logging performance overhead 2023-10-26 17:40:06 +00:00
Dmitrii Krasnov 10a6d8fd2c [Gradle IT] Added configuration for running IT with k/n from master
[Gradle] Updated kotlin-build-gradle-plugin to 0.0.40

#KT-45978 Ready for Review


Merge-request: KT-MR-12509
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-10-24 08:38:51 +00:00
Svyatoslav Scherbina e22d9821e2 Native: fix kotlin-native/performance/framework build script for K2
The build script manually specifies which directories are parts of
which source sets. And it did that wrong: all directories were just
added to the nativeMain source set.
This was an incorrect configuration (matching expect and actual were
getting into the same source set), and K2 compiler was not really happy
with that.

This commit fixes the correspondence between source sets and source
directories in kotlin-native/performance/framework build script, thus
fixes the build for that benchmark with K2.
2023-10-05 09:17:58 +00:00
Svyatoslav Scherbina 4672727bd6 Native: enable K2 for benchmarks in performance/
Those benchmarks are built with bootstrap KGP and snapshot compiler.
Currently the former is K1, while the latter is K2. As a result, the
build fails because K2 compiler needs -Xfragment-sources argument,
while K1 uses -Xcommon-sources. So KGP passes the latter, while the
compiler expects the former.

Fix this by forcing KGP to use K2 for benchmarks in performance/
This can be reverted once bootstrap is updated to 2.0.0.
2023-10-05 09:17:58 +00:00
Timofey Solonin 9e7d9f3b53 Use llbuild.framework bundled with the internal toolchain
^KT-61369
2023-09-13 10:12:51 +00:00
Aleksei.Glushko 3efd98df1a [K/N] More work to do for weak-sweeper in weak ref benchmarks
Merge-request: KT-MR-11899
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com>
2023-08-29 10:52:33 +00:00
Troels Bjerre Lund f67ec22c24 [K/N] Fix the native performance benchmark build
kotlin.native.concurrent.FreezableAtomicReference was depricated, so it
has been replaced by a kotlin.concurrent.AtomicReference
2023-08-23 14:29:29 +00:00
Dmitrii Krasnov ade88e2b0f Fixed konan.data.dir with caches
Removed TODOs after updating to kotlin bootstrap version with konan.data.dir gradle property changes

Fixed warning of incorrect passing -Xkonan-data-dir arg in konanc from KGP and fixed setting konan-data-dir in SetupConfiguration#setupCommonOptionsForCaches

#KT-60660 Fixed

Merge-request: KT-MR-11299
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-08-22 07:56:26 +00:00
Yahor Berdnikau 380062c511 [repo] Update the shadow version to 8.1.1 release
https://github.com/johnrengelman/shadow/releases/tag/8.1.1
2023-08-09 08:36:46 +00:00
Alexander Shabalin 22d075dcda [K/N] Fix swiftinterop performance build 2023-07-26 15:45:26 +00:00
Alexander Shabalin fefb95a432 [K/N] Fix numerical performance build 2023-07-26 15:45:26 +00:00
Svyatoslav Scherbina bfcb90c716 Native: add ExperimentalForeignApi opt-in to performance tests
3f3f6eb marks all cinterop-generated declarations with
@ExperimentalForeignApi. As a result, all usages of such declarations
have to opt-in explicitly. This commit adds those opt-ins to all
usages in the performance tests.

^KT-58362
2023-07-24 09:11:58 +00:00
Alexander Shabalin bdb534c3de [K/N] Fix perf build 2023-07-17 16:56:34 +00:00
Dmitrii Krasnov f2816a5531 Added property for overriding konan distribution location
#KT-50463 Fixed

Merge-request: KT-MR-10310
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-07-12 12:36:51 +00:00
Alexander Shabalin e1b168d77c [K/N] Fix performance build 2023-07-03 15:49:42 +00:00
Pavel Punegov 7927ff2a24 [K/N][perf] Update wrapper to 8.1.1
Performance project could be opened as a separate project
in the IDEA using this wrapper. To work around any issues
with the build, it should be the same version as
in the Kotlin project.
2023-06-26 17:29:40 +00:00
Pavel Punegov 854aee4bfb [K/N][perf] Set jvmTarget in the build
Set 1.8 as jvmTargets to match JavaCompile tasks
targetCompatibility version
2023-06-26 17:29:40 +00:00
cristiangarcia 46d113605b Adopt configuration-avoidance where possible
Before this change `./gradlew help` (with native enabled)
Created immediately: 1322
Created during configuration: 1541

after this change:
Created immediately: 596
Created during configuration: 1509

To know more about configuration avoidance: https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
2023-06-06 14:27:42 +00:00
Pavel Punegov 5a95d919c7 [K/N] Add kotlinx.cinterop.ExperimentalForeignApi opt-ins
Add more opt-ins in Samples, tests and Benchmarks.
This is a follow-up to KT-MR-9788 

Merge-request: KT-MR-9997
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-05-09 09:39:40 +00:00
Aleksei.Glushko cfa481d38f [K/N] Benches for parallel mark: life + splay with mark helpers
Merge-request: KOTLIN-MR-669
Merged-by: Aleksej Glushko <aleksei.glushko@jetbrains.com>
2023-05-02 10:24:25 +00:00
Svyatoslav Scherbina 509a97a7b5 Native: add coroutines into buildSrc classpath of performance builds
^KT-58160
2023-04-21 16:19:55 +00:00
Svyatoslav Scherbina 8466bec048 Native: fix ring benchmark compilation error
`@file:OptIn` can't be applied to a class. Change it to `@OptIn`.
2023-04-17 13:03:13 +00:00
Abduqodiri Qurbonzoda e1c91ee50f [K/N] Move kotlin.native.internal.GC into kotlin.native.runtime
As a part of efforts to stabilize Native stdlib #KT-55765.
2023-04-12 13:07:50 +03:00
Pavel Punegov e82efa6a7c [K/N][perf] Update gradle wrapper to 7.6 in Performance projects 2023-02-27 10:48:28 +00:00
Pavel Punegov c49128aa99 [K/N][perf] Performance project build
* Add build-tools plugin
* Cleanup code
* Add missing methods after the move
2023-02-27 10:48:27 +00:00
Pavel Punegov 395e3e0f81 [K/N][build] Composite build with build.tools-conventions plugin
Adds convention plugin instead of sources inclusion
inside the buildSrc, effectively reducing the amount
of the code to be compiled in buildSrc.

Merge-request: KT-MR-8898
2023-02-27 10:48:26 +00:00
Pavel Punegov 71f2c3cf9b [K/N][perf] Move benchmarks related code to performance subdir 2023-02-27 10:48:25 +00:00
Nikolay Krasko e8e79985a5 Fix import for performance project when kotlin.native is enabled 2023-02-06 10:01:52 +00:00
Aleksei.Glushko b01ef8465a [K/N] Add ring/GenericArrayView bench
also .gitignore cmake-build-debug on all levels

Merge-request: KT-MR-8412
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com>
2023-02-01 15:16:09 +00:00
Pavel Punegov c9aeadd31f [K/N] Remove old Compiler and Meta Version ^KT-55677 Fixed
* Replace it with KotlinCompilerVersion
* K/N version should be set now with `deployVersion`.
* Cleanup deprecated functions in older versions
 of the Gradle plugin
* Cleanup tests for older versions of compiler downloader

Merge-request: KT-MR-8436
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-01-30 13:10:08 +00:00
Sergej Jaskiewicz e4d32f3615 Bump kotlin-build-gradle-plugin version to 0.0.39
This is so that the new APIs added in
d50c072af0 could be used in subprojects
that depend on kotlin-build-gradle-plugin
2023-01-05 10:13:38 +00:00
Alexander Shabalin 44ea1debf4 [K/N] Fix performance build ^KT-53776
Merge-request: KT-MR-8119
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-12-22 12:39:33 +00:00
Yahor Berdnikau a14d0d148b Simplify Kotlin bootstrap application in the project
Move all the code to apply Kotlin bootstrap into settings script plugin
which does following:
- configures based either on the repo root 'local.properties' or on the
root project gradle properties or on the repo root 'gradle.properties'
current type of bootstrap
- automatically adds Kotlin bootstrap repository with
exclusive content, so bootstrap dependencies will not be by mistake
downloaded from other repository
- automatically forces all Kotlin plugins applied in the build to use
bootstrap version

This script should be applied only in project settings.gradle and then
it does all the configuration by itself.
2022-11-29 14:31:48 +00:00
Troels Bjerre Lund 1fbc478833 [K/N] Fix benchmark build
The bootstrap advance to 1.8.20-dev-2904 broke the K/N performance
benchmark build, when built in non-Java8 environments.


Co-authored-by: Troels Lund <troels@google.com>

Merge-request: KOTLIN-MR-576
Merged-by: Pavel Punegov <pavel.punegov@jetbrains.com>
2022-11-24 14:54:32 +00:00
Alexander Shabalin a31c3f979b [K/N] Benchmarks on weak references
Merge-request: KT-MR-7575
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-11-15 13:22:15 +00:00
Vladimir Sukharev 574d78efce [K/N] Remove remains of jcenter from kotlin-native/
Revert two special entries

Use proper mavenCentral()

Remove remains of jcenter from kotlin-native/

Merge-request: KT-MR-7610
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-11-09 13:23:09 +00:00
Nikolay Krasko a4cd485f48 Remove native-platform 0.14 usage from the buildSrc
It looks like net.rubygrapefruit:native-platform:0.14 is not in
plugins.gradle.org repository anymore.

And it's not used anyway.

> Task :buildSrc:generateExternalPluginSpecBuilders FAILED

'''
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildSrc:generateExternalPluginSpecBuilders'.
> Could not resolve all files for configuration ':buildSrc:compileClasspath'.
   > Could not find native-platform-0.14.jar (net.rubygrapefruit:native-platform:0.14).
     Searched in the following locations:
         https://cache-redirector.jetbrains.com/plugins.gradle.org/net/rubygrapefruit/native-platform/0.14/native-platform-0.14.jar
'''

Can be reproduced with

```gradle --refresh-dependencies -i tasks -Pkotlin.native.enabled=true```

KTI-986
2022-11-08 21:31:43 +01:00
Vladimir Sukharev 44f638e952 Drop K/N dependency to JCenter 2022-11-03 10:51:56 +00:00
Pavel Punegov 00e9544670 [K/N][perf] Set project properties for benchmarksAnalyzer build
Merge-request: KT-MR-7520
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2022-11-01 13:44:29 +00:00