mirror of
https://github.com/dart-lang/sdk
synced 2024-10-04 16:04:53 +00:00
[ Service ] Disable CPU sample block streaming
See https://github.com/dart-lang/sdk/issues/46825 TEST=vm/cc/Profiler_* and service tests Change-Id: I98faa1953a3bf3c28828dabaa0be6b033ada63fb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209260 Commit-Queue: Siva Annamalai <asiva@google.com> Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
parent
003e79752c
commit
b225582593
|
@ -4,7 +4,8 @@
|
|||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:test/test.dart';
|
||||
// TODO(bkonyi): re-import after sample streaming is fixed.
|
||||
// import 'package:test/test.dart';
|
||||
import 'package:vm_service/vm_service.dart';
|
||||
|
||||
import 'common/service_test_common.dart';
|
||||
|
@ -31,7 +32,9 @@ late StreamSubscription sub;
|
|||
|
||||
var tests = <IsolateTest>[
|
||||
(VmService service, IsolateRef isolate) async {
|
||||
final completer = Completer<void>();
|
||||
// TODO(bkonyi): re-enable after sample streaming is fixed.
|
||||
// See https://github.com/dart-lang/sdk/issues/46825
|
||||
/*final completer = Completer<void>();
|
||||
int count = 0;
|
||||
int previousOrigin = 0;
|
||||
sub = service.onProfilerEvent.listen((event) async {
|
||||
|
@ -56,6 +59,7 @@ var tests = <IsolateTest>[
|
|||
|
||||
await completer.future;
|
||||
await service.streamCancel(EventStreams.kProfiler);
|
||||
*/
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -306,6 +306,12 @@ Sample* SampleBlockBuffer::ReserveSampleImpl(Isolate* isolate,
|
|||
Sample* sample = nullptr;
|
||||
if (block != nullptr) {
|
||||
sample = block->ReserveSample();
|
||||
if (sample != nullptr && block->is_full()) {
|
||||
// TODO(bkonyi): remove once streaming is re-enabled.
|
||||
// https://github.com/dart-lang/sdk/issues/46825
|
||||
block->evictable_ = true;
|
||||
FreeBlock(block);
|
||||
}
|
||||
}
|
||||
if (sample != nullptr) {
|
||||
return sample;
|
||||
|
@ -330,8 +336,11 @@ Sample* SampleBlockBuffer::ReserveSampleImpl(Isolate* isolate,
|
|||
isolate->set_current_sample_block(next);
|
||||
}
|
||||
next->set_is_allocation_block(allocation_sample);
|
||||
|
||||
can_process_block_.store(true);
|
||||
isolate->mutator_thread()->ScheduleInterrupts(Thread::kVMInterrupt);
|
||||
// TODO(bkonyi): re-enable after block streaming is fixed.
|
||||
// See https://github.com/dart-lang/sdk/issues/46825
|
||||
// isolate->mutator_thread()->ScheduleInterrupts(Thread::kVMInterrupt);
|
||||
return ReserveSampleImpl(isolate, allocation_sample);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue