1 /* |
1 /* |
2 * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
314 type_set.write(writer, NULL); |
314 type_set.write(writer, NULL); |
315 }; |
315 }; |
316 |
316 |
317 void TypeSet::serialize(JfrCheckpointWriter& writer) { |
317 void TypeSet::serialize(JfrCheckpointWriter& writer) { |
318 TypeSetSerialization type_set(false); |
318 TypeSetSerialization type_set(false); |
319 if (LeakProfiler::is_suspended()) { |
319 if (LeakProfiler::is_running()) { |
320 JfrCheckpointWriter leakp_writer(false, true, Thread::current()); |
320 JfrCheckpointWriter leakp_writer(false, true, Thread::current()); |
321 type_set.write(writer, &leakp_writer); |
321 type_set.write(writer, &leakp_writer); |
322 ObjectSampleCheckpoint::install(leakp_writer, false, true); |
322 ObjectSampleCheckpoint::install(leakp_writer, false, true); |
323 return; |
323 return; |
324 } |
324 } |