This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright 2018 Andrei Pangin | |
| * | |
| * This is a specialized Java port of the FlameGraph script available at | |
| * https://github.com/brendangregg/FlameGraph/blob/master/flamegraph.pl | |
| * | |
| * Copyright 2016 Netflix, Inc. | |
| * Copyright 2011 Joyent, Inc. All rights reserved. | |
| * Copyright 2011 Brendan Gregg. All rights reserved. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.demo.jol; | |
| import org.openjdk.jol.info.ClassLayout; | |
| import java.io.IOException; | |
| import java.util.concurrent.TimeUnit; | |
| /** | |
| * @author: TuGai | |
| * @createTime: 2020-04-15 19:48 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| |----------------------------------------------------------------------------------------|--------------------| | |
| | Object Header (64 bits) | State | | |
| |-------------------------------------------------------|--------------------------------|--------------------| | |
| | Mark Word (32 bits) | Klass Word (32 bits) | | | |
| |-------------------------------------------------------|--------------------------------|--------------------| | |
| | identity_hashcode:25 | age:4 | biased_lock:1 | lock:2 | OOP to metadata object | Normal | | |
| |-------------------------------------------------------|--------------------------------|--------------------| | |
| | thread:23 | epoch:2 | age:4 | biased_lock:1 | lock:2 | OOP to metadata object | Biased | | |
| |-------------------------------------------------------|--------------------------------|--------------------| | |
| | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved. | |
| * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
| * | |
| * This code is free software; you can redistribute it and/or modify it | |
| * under the terms of the GNU General Public License version 2 only, as | |
| * published by the Free Software Foundation. Oracle designates this | |
| * particular file as subject to the "Classpath" exception as provided | |
| * by Oracle in the LICENSE file that accompanied this code. | |
| * |