|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * The Universal Permissive License (UPL), Version 1.0
|
|
69 | 69 | import com.oracle.graal.python.runtime.object.PythonObjectSlowPathFactory;
|
70 | 70 | import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
|
71 | 71 | import com.oracle.truffle.api.InstrumentInfo;
|
72 |
| -import com.oracle.truffle.api.TruffleContext; |
73 | 72 | import com.oracle.truffle.api.TruffleLanguage.Env;
|
74 | 73 | import com.oracle.truffle.api.dsl.GenerateNodeFactory;
|
75 | 74 | import com.oracle.truffle.api.dsl.NodeFactory;
|
@@ -282,9 +281,8 @@ abstract static class GetStats extends PythonBuiltinNode {
|
282 | 281 | static PList doit(Profiler self) {
|
283 | 282 | double avgSampleSeconds = self.sampler.getPeriod() / 1000D;
|
284 | 283 | List<PTuple> entries = new ArrayList<>();
|
285 |
| - Map<TruffleContext, CPUSamplerData> data = self.sampler.getData(); |
286 |
| - for (TruffleContext context : data.keySet()) { |
287 |
| - Map<Thread, Collection<ProfilerNode<Payload>>> threads = data.get(context).getThreadData(); |
| 284 | + for (CPUSamplerData data : self.sampler.getDataList()) { |
| 285 | + Map<Thread, Collection<ProfilerNode<Payload>>> threads = data.getThreadData(); |
288 | 286 | for (Thread thread : threads.keySet()) {
|
289 | 287 | for (ProfilerNode<Payload> node : threads.get(thread)) {
|
290 | 288 | countNode(entries, node, avgSampleSeconds);
|
|
0 commit comments