Commit Graph

57 Commits

Author SHA1 Message Date
Pavel Kunyavskiy 0be789e9e3 [K/N] Add API for garbage collection statistics
^KT-53064
2022-11-24 13:14:37 +00:00
Alexander Shabalin 5ef9a5a240 [K/N] Crash with OOM on large array allocations ^KT-54659
Merge-request: KT-MR-7507
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-11-01 11:00:23 +00:00
Vladimir Sukharev 7f1ab29668 Fix Windows targets has bad addresses in stacktrace
^KT-49240 Fixed

Merge-request: KT-MR-6883
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-08-24 09:05:06 +00:00
Alexander Shabalin 6f844f15e0 [K/N] Worker API improvements ^KT-52429
Merge-request: KT-MR-6898
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-08-22 10:41:14 +00:00
Alexander Shabalin 41d6dc5914 [K/N] Allow to unset unhandled exception hook ^KT-49228 2022-08-01 19:53:21 +00:00
Pavel Kunyavskiy c7131a68ce [K/N] Support of collectReferenceFieldValues function 2022-07-19 08:40:14 +00:00
Alexander Shabalin 29f3445721 [K/N] Deprecated freezing ^KT-50541
Starting with 1.7.20 freezing is deprecated. See https://github.com/JetBrains/kotlin/blob/master/kotlin-native/NEW_MM.md#freezing-deprecation for details.

Merge-request: KT-MR-6399
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-06-16 09:04:14 +00:00
Ilya Matveev 78d179e9ab [K/N][runtime] Track safepoints in aggressive GC
Issue #KT-49188 Fixed
2022-05-18 13:48:49 +00:00
Svyatoslav Scherbina 42ed0c5fe6 Native: add .alloc(value) for primitive types to interop runtime
^KT-50312 Fixed
2022-03-22 18:49:09 +03:00
Ilya Matveev 8668797afd [K/N][tests] Do not run backed.native tests with aggressive GC 2022-02-03 07:30:33 +00:00
Pavel Kunyavskiy 803014ef24 [K/N] Test for freezing disabling 2022-01-25 13:43:48 +00:00
Pavel Kunyavskiy 3798920183 [K/N] Any.isFrozen is now always false when freezing is disabled 2022-01-24 13:38:30 +00:00
Alexander Shabalin 4fd61ad1b0 [K/N] Change AtomicReference for the new MM ^KT-50026
Make AtomicReference behave like FreezableAtomicReference with the new MM: not frozen by default, don't require freezing value unless the ref itself is frozen. The behaviour with the old MM is unchanged.

Merge-request: KT-MR-5155
2021-12-03 17:08:21 +00:00
Svyatoslav Scherbina 24e7a11abc Native: fix losing Worker.executeAfter jobs on scheduled time clash
The implementation was keeping delayed jobs in std::set sorted
only by the scheduled execution time (in microseconds since epoch).
So two jobs submitted to a worker and having the same scheduled time
were considered equivalent by the set, and one of them got lost.

Fix this by using std::multiset instead of std::set.
2021-11-26 11:59:40 +00:00
Sergey Bogolepov bc144887ea [K/N] Add native test for KT-48591
We can't rely on stdlib tests now, because they are not
executed with compiler caches.
2021-11-09 08:27:58 +00:00
Alexander Shabalin c678702847 [K/N] Add tests on Atomic integers ^KT-49348 2021-10-27 13:54:35 +00:00
Pavel Kunyavskiy 504d72011b [K/N] Transform FunctionReference without bound values to ConstantValue 2021-10-14 11:22:26 +00:00
Pavel Kunyavskiy 0bd4dbc0c1 [K/N] Disable debug info in runtime by default
Bundle grows 200mb if debug info is enabled, it's too much.
But probably, this can be useful for debug, so we need gradle option.
2021-10-11 11:45:24 +00:00
Abduqodiri Qurbonzoda 93833f7db2 Advance K/N StringBuilder.appendln() deprecation level to ERROR #KT-38754 2021-09-20 15:25:53 +03:00
Pavel Kunyavskiy c704fd6ae7 [K/N] Support stacktrace using libbacktrace 2021-09-20 11:28:08 +00:00
Abduqodiri Qurbonzoda 718965227e Advance deprecation level of K/N StringBuilder renamed functions to ERROR #KT-46101 2021-09-16 19:45:04 +03:00
Elena Lepilkina cb067e160b [K/N] Updated RSS limit for new version of mimalloc 2021-09-08 13:53:18 +00:00
Abduqodiri Qurbonzoda 97eb28144f Introduce Common readln() and readlnOrNull() top-level functions #KT-48456 2021-09-05 15:31:11 +00:00
Pavel Kunyavskiy 98e4d67900 [K/N] Add opt-in flag to use debug info from native libs
Unfortunately, llvm removes full debug info from module on any error.
Different version debug info in bitcode is not always compatible, also
it adds this debug info additional requirements on generated debug info.

So this feature is quite unstable and shouldn't be enabled by default,
although it has almost no downsides when worked correctly.
2021-09-01 08:35:21 +00:00
Dmitriy Dolovov b506704a2b [Native][tests] Fix failing 'runtime_basic_init' test
This test should have it's own test data file.

Previously it used 'hello3.kt' test data file shared with 'hello3' test which uses golden data. This caused a conflict.
2021-09-01 10:14:17 +03:00
Dmitriy Dolovov bf82db5ee2 [Native][tests] Move input data outside of Gradle build file 2021-09-01 10:14:06 +03:00
Dmitriy Dolovov 1a863106e6 [Native][tests] Move golden data outside of Gradle build file 2021-09-01 10:14:01 +03:00
Dmitriy Dolovov c2e2d3a43e [Native][tests] workers5 - remove redundant test annotations 2021-09-01 10:13:55 +03:00
Sergey Bogolepov 587146679d [K/N] Add tests for -Xbinary=freezing=... 2021-08-30 12:33:04 +00:00
Ilya Matveev 99bd26c2ef [K/N][Runtime] Switch thread states in termination handlers 2021-08-26 14:46:07 +00:00
Pavel Kunyavskiy d88a665fa8 [K/N] Implement Lazy for new mm 2021-08-13 13:20:59 +00:00
Pavel Punegov cd487efbe9 [Native][test] Exclude FP parsing tests that require exceptions on WASM 2021-08-11 13:56:47 +00:00
Alexander Shabalin 7e04bb4bf1 [K/N] Refactor unhandled exception handling API
* Do not reset unhandled exception hook
* Add processUnhandledException to perform default unhandled exception
  processing
* Add terminateWithUnhandledException to report the unhandled exception
  and terminate the program
* Use the default unhandled exception processing in entrypoint, interop
  boundaries and in Worker.executeAfter
* Add -Xworker-exception-handling to control exception processing of
  Worker.executeAfter. By default its the old behaviour with the old MM,
  and new behaviour with the new MM.
2021-08-10 08:22:55 +00:00
max-kammerer 5b21444805 Update worker11.kt 2021-07-21 13:36:02 +02:00
Andrey Kuleshov 26a71af6b3 [Native, All platforms] HotFix of the incorrect parsing of long strings to Float and Double (#4492)
### What's done:
- Fixed incorrect logic of String.toFloat() and String.toDouble().
  Long string without any digits were treated as Float or Double:
  "this string does not look as float isn't it?".toFloat() == "Infinity".

- Fixed incorrect parsing of floating point constants "NaN" and "Infinity":
  String values like "NaNPICEZy" or "InfinityN" were treated as valid numbers.

- Merged parsing logic for Double and Float:
  Removed the code duplication, unified methods, made the code more Kotlin-like, not C++-like.

- Updated tests:
  Removed useless tests that checked nothing, updated tests with regression scenarios.
2021-07-15 14:47:55 +07:00
Alexander Shabalin 092750e215 Fix race in Lazy for the new MM 2021-06-29 06:29:57 +00:00
Alexander Shabalin 455625bcee Use FreezableAtomicReference in unhandled exception hook 2021-06-29 06:29:57 +00:00
Alexander Shabalin 28b6427d3e Make FreezableAtomicReference atomic when unfrozen for the new MM. 2021-06-25 21:18:37 +00:00
Alexander Shabalin cc71069a3a Do not require freezing for Worker.executeAfter on experimental MM 2021-06-24 07:57:23 +00:00
Alexander Shabalin ebc4e10684 Fix GC stress test. 2021-06-21 16:07:57 +00:00
Svyatoslav Scherbina 2a54f1c610 Improve exception messages for kotlin.native.concurrent.* operations 2021-06-18 13:51:21 +00:00
Alexander Shabalin e3eec33b24 Add aggressively allocating stress test for GC 2021-06-16 21:34:05 +00:00
Alexander Shabalin 9ebba93dd9 Make SingleThreadMarkAndSweep support multiple threads 2021-06-10 09:59:37 +00:00
Dmitriy Dolovov 2b161581ca K/N: Use class FQN in default toString() implementation
^KT-47167
2021-06-10 11:02:21 +03:00
Alexander Shabalin e0c7cda1cf Adjust test expectations for the new MM 2021-05-27 11:39:56 +00:00
Alexander Shabalin 73533e4b19 Make NoOp GC support multiple mutators 2021-05-21 06:31:09 +00:00
Abduqodiri Qurbonzoda b18cd24b81 [K/N] Advance deprecation level of FP to lesser than Int types to ERROR #KT-30360 2021-04-07 15:43:06 +03:00
Abduqodiri Qurbonzoda 7a6cddf6fe [K/N] Advance String(CharArray) deprecation level to ERROR 2021-04-07 00:23:32 +03:00
Alexander Shabalin 3a5c6480a3 Track current exception (#4701) 2021-02-24 11:00:05 +01:00
Alexander Shabalin d5ca285a79 Move unhandledExceptionHook to kotlin code (#4704) 2021-02-24 10:53:42 +01:00