JVM在线分析-解决问题的工具一(jinfo,jmap,jstack)

1. jinfo

(base) PS C:\Users\zishi\Desktop> jinfo
Usage:
    jinfo <option> <pid>
       (to connect to a running process)

where <option> is one of:
    -flag <name>         to print the value of the named VM flag #输出对应名称的参数
    -flag [+|-]<name>    to enable or disable the named VM flag
    # 开启或者关闭对应名称的参数 只有被标记为 manageable 的参数才可以被动态修改
    -flag <name>=<value> to set the named VM flag to the given value  #设定对应名称的参数
    -flags               to print VM flags # 输出全部的参数
    -sysprops            to print Java system properties #输出系统属性
    <no option>          to print both VM flags and system properties 
    -? | -h | --help | -help to print this help message
(base) PS C:\Users\zishi> jinfo 9368
Java System Properties:
#Thu Nov 09 09:05:06 CST 2023
sun.desktop=windows
awt.toolkit=sun.awt.windows.WToolkit
java.specification.version=11
sun.cpu.isalist=amd64
sun.jnu.encoding=GBK
java.class.path=.\\quality-server.jar
java.vm.vendor=Oracle Corporation
sun.arch.data.model=64
user.variant=
catalina.useNaming=false
java.vendor.url=https\://openjdk.java.net/
。。。。略去
(base) PS C:\Users\zishi> jinfo  -sysprops 9368
Java System Properties:
#Thu Nov 09 09:07:07 CST 2023
sun.desktop=windows
awt.toolkit=sun.awt.windows.WToolkit
。。。。略去
(base) PS C:\Users\zishi> jinfo  -flags 9368
VM Flags:
-XX:CICompilerCount=4 
-XX:ConcGCThreads=3 
-XX:G1ConcRefinementThreads=10 
-XX:G1HeapRegionSize=2097152 
-XX:GCDrainStackTargetSize=64 
-XX:InitialHeapSize=534773760 
-XX:MarkStackSize=4194304 
-XX:MaxHeapSize=8524922880 
-XX:MaxNewSize=5114953728 
-XX:MinHeapDeltaBytes=2097152 
-XX:NonNMethodCodeHeapSize=5836300 
-XX:NonProfiledCodeHeapSize=122910970 
-XX:ProfiledCodeHeapSize=122910970 
-XX:ReservedCodeCacheSize=251658240 
-XX:+SegmentedCodeCache 
-XX:+UseCompressedClassPointers 
-XX:+UseCompressedOops 
-XX:+UseG1GC 
-XX:-UseLargePagesIndividualAllocation
(base) PS C:\Users\zishi> jinfo  -flag MaxHeapSize 9368
-XX:MaxHeapSize=8524922880
(base) PS C:\Users\zishi> jinfo  -flag MaxHeapSize=8524922883 9368
Exception in thread "main" com.sun.tools.attach.AttachOperationFailedException: flag 'MaxHeapSize' cannot be changed
        at jdk.attach/sun.tools.attach.VirtualMachineImpl.execute(VirtualMachineImpl.java:130)
        at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:309)
        at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.setFlag(HotSpotVirtualMachine.java:282)
        at jdk.jcmd/sun.tools.jinfo.JInfo.flag(JInfo.java:146)
        at jdk.jcmd/sun.tools.jinfo.JInfo.main(JInfo.java:127)

查看被标记为 manageable 的参数

$ java -XX:+PrintFlagsFinal -version | grep  manageable
     intx CMSAbortablePrecleanWaitMillis           = 100                                    {manageable} {default}
     intx CMSTriggerInterval                       = -1                                     {manageable} {default}
     intx CMSWaitDuration                          = 2000                                   {manageable} {default}
     bool HeapDumpAfterFullGC                      = false                                  {manageable} {default}
     bool HeapDumpBeforeFullGC                     = false                                  {manageable} {default}
     bool HeapDumpOnOutOfMemoryError               = false                                  {manageable} {default}
    ccstr HeapDumpPath                             =                                        {manageable} {default}
    uintx MaxHeapFreeRatio                         = 70                                     {manageable} {default}
    uintx MinHeapFreeRatio                         = 40                                     {manageable} {default}
     bool PrintClassHistogram                      = false                                  {manageable} {default}
     bool PrintConcurrentLocks                     = false                                  {manageable} {default}
java version "11.0.13" 2021-10-19 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.13+10-LTS-370)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.13+10-LTS-370, mixed mode)

在这里插入图片描述
修改参数的值

(base) PS C:\Users\zishi> jinfo  -flag MaxHeapFreeRatio 9368
-XX:MaxHeapFreeRatio=70
(base) PS C:\Users\zishi> jinfo  -flag MaxHeapFreeRatio=80 9368
(base) PS C:\Users\zishi> jinfo  -flag MaxHeapFreeRatio 9368
-XX:MaxHeapFreeRatio=80

开启参数:

(base) PS C:\Users\zishi> jinfo -flag HeapDumpBeforeFullGC 9368
-XX:-HeapDumpBeforeFullGC
(base) PS C:\Users\zishi> jinfo -flag +HeapDumpBeforeFullGC 9368
(base) PS C:\Users\zishi> jinfo -flag HeapDumpBeforeFullGC 9368
-XX:+HeapDumpBeforeFullGC

扩展
java -XX:+PrintFlagsInitial 查看所有 JVM 参数启动的初始值
java -XX:+PrintFlagsFinal 查看所有 JVM 参数的最终值
java -XX:+PrintCommandLineFlags 查看哪些已经被用户或者 JVM 设置过的详细的 XX 参数的名称和值

2. jmap

(base) PS C:\Users\zishi> jmap
Usage:
    jmap -clstats <pid>
        to connect to running process and print class loader statistics
    jmap -finalizerinfo <pid>
        to connect to running process and print information on objects awaiting finalization
    jmap -histo[:live] <pid>
        to connect to running process and print histogram of java object heap
        if the "live" suboption is specified, only count live objects
    jmap -dump:<dump-options> <pid>
        to connect to running process and dump java heap
    jmap -? -h --help
        to print this help message

    dump-options:
      live         dump only live objects; if not specified,
                   all objects in the heap are dumped.
      format=b     binary format
      file=<file>  dump heap to <file>

    Example: jmap -dump:live,format=b,file=heap.bin <pid>
$ jmap -clstats 9368 > a.txt
$ cat a.txt | head -n 10
Index Super InstBytes KlassBytes annotations    CpAll MethodCount Bytecodes MethodAll    ROAll    RWAll    Total ClassName
    1    -1  10510264        504           0        0           0         0         0       24      616      640 [B
    2  8286   5545320       1112           0     6816          47      1117     27912     6480    30104    36584 java.lang.reflect.Method
    3    18   4025232        616         128    14264         109      4576     71992    18640    69664    88304 java.lang.String
    4    18   2461504        592           0     1360           9       213      2720     1488     3520     5008 java.util.concurrent.ConcurrentHashMap$Node
    5    -1   2286832        504           0        0           0         0         0       24      616      640 [Ljava.lang.Object;
    6    -1   2075104        504           0        0           0         0         0       32      616      648 [Ljava.util.HashMap$Node;
    7    18   2013216        584           0     1384           7       149      1816     1152     2952     4104 java.util.HashMap$Node
    8     7   1977960        584           0      504           1        10       624      304     1640     1944 java.util.LinkedHashMap$Entry
    9    18   1720280        672           0    22112         139      5679     85040    24632    85104   109736 java.lang.Class

$ jmap -clstats 9368 | grep com.zishi.docuvate.exception
 4077    18        16        552          56     2568           6       282      1576     1448     3504     4952 com.zishi.docuvate.exception.GlobalExceptionHandler
 7429  7856         0        624           0      440           3        54       568      464     1368     1832 com.zishi.docuvate.exception.BadRequestException
 7430  7856         0        640           0      624           8       105      1472     1072     1952     3024 com.zishi.docuvate.exception.GlobalException

说明:

Index
Super
InstBytes
KlassBytes
annotations
CpAll
MethodCount
Bytecodes
MethodAll
ROAll
RWAll
Total
ClassName: 类的完全限定名

(base) PS C:\Users\zishi> jmap -histo 23152
 num     #instances         #bytes  class name (module)
-------------------------------------------------------
   1:       1164144      152211432  [B (java.base@11.0.13)
   2:        147373       44824568  [I (java.base@11.0.13)
   3:        694738       16673712  java.lang.String (java.base@11.0.13)
   4:        601819       12621496  [Ljava.lang.Class; (java.base@11.0.13)
   5:        107422        9453136  java.lang.reflect.Method (java.base@11.0.13)
   6:        113936        7291904  java.net.URL (java.base@11.0.13)
   7:        141772        4536704  org.springframework.boot.loader.jar.StringSequence
   8:         75593        4434728  [Ljava.lang.Object; (java.base@11.0.13)
   9:        178622        4286928  java.lang.StringBuilder (java.base@11.0.13)
  10:        102026        4081040  org.springframework.core.annotation.TypeMappedAnnotations
  11:         36093        2871384  [Ljava.util.HashMap$Node; (java.base@11.0.13)
  12:         88017        2816544  java.util.concurrent.ConcurrentHashMap$Node (java.base@11.0.13)
  13:         84459        2702688  org.springframework.core.annotation.TypeMappedAnnotations$MergedAnnotationFinder
  14:         82805        2649760  java.util.HashMap$Node (java.base@11.0.13)
  15:         64740        2589600  java.util.LinkedHashMap$Entry (java.base@11.0.13)
  16:         49166        2359968  java.util.HashMap (java.base@11.0.13)
  17:         92807        2227368  org.springframework.boot.loader.jar.JarURLConnection$JarEntryName
  18:         12370        2153808  [C (java.base@11.0.13)

说明:

#instances:对象数量
#bytes: 占用内存大小(单位:字节)
class name (module): 类的完全限定名

3. jstack

(base) PS C:\Users\zishi> jstack
Usage:
    jstack [-l][-e] <pid>
        (to connect to running process)

Options:
    -l  long listing. Prints additional information about locks
    -e  extended listing. Prints additional information about threads
    -? -h --help -help to print this help message

代码示例:

/**
 * 当DeadLock类的对象flag==1时(td1),先锁定o1,睡眠500毫秒
 * 而td1在睡眠的时候另一个flag==0的对象(td2)线程启动,先锁定o2,睡眠500毫秒
 * td1睡眠结束后需要锁定o2才能继续执行,而此时o2已被td2锁定;
 * td2睡眠结束后需要锁定o1才能继续执行,而此时o1已被td1锁定;
 * td1、td2相互等待,都需要得到对方锁定的资源才能继续执行,从而死锁。
 */
public class DeadLockTest implements Runnable{

    public int flag = 1;
    
    //静态对象是类的所有对象共享的
    private static Object o1 = new Object(), o2 = new Object();
    @Override
    public void run() {
        System.out.println("flag=" + flag);
        if (flag == 1) {
            synchronized (o1) {
                try {
                    Thread.sleep(500);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                synchronized (o2) {
                    System.out.println("1");
                }
            }
        }
        if (flag == 0) {
            synchronized (o2) {
                try {
                    Thread.sleep(500);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                synchronized (o1) {
                    System.out.println("0");
                }
            }
        }
    }

    public static void main(String[] args) {
        DeadLockTest td1 = new DeadLockTest();
        DeadLockTest td2 = new DeadLockTest();
        td1.flag = 1;
        td2.flag = 0;
        //td1,td2都处于可执行状态,但JVM线程调度先执行哪个线程是不确定的。
        //td2的run()可能在td1的run()之前运行
        new Thread(td1).start();
        new Thread(td2).start();
    }
}

编译运行,执行jstack

(base) PS C:\Users\zishi> jstack 21744
2023-11-09 18:47:14
Full thread dump Java HotSpot(TM) 64-Bit Server VM (11.0.13+10-LTS-370 mixed mode):

Threads class SMR info:
_java_thread_list=0x000001d91fca51a0, length=12, elements={
0x000001d91fa90800, 0x000001d91fab5800, 0x000001d91fb2b800, 0x000001d91fb2c800,
0x000001d91fb2e000, 0x000001d91fb31000, 0x000001d91fb32800, 0x000001d91fb35800,
0x000001d91fcb6800, 0x000001d91fcbc000, 0x000001d91fcbc800, 0x000001d972982000
}

"Reference Handler" #2 daemon prio=10 os_prio=2 cpu=0.00ms elapsed=18.72s tid=0x000001d91fa90800 nid=0x2aac waiting on condition  [0x000000aacf8ff000]
   java.lang.Thread.State: RUNNABLE
        at java.lang.ref.Reference.waitForReferencePendingList(java.base@11.0.13/Native Method)
        at java.lang.ref.Reference.processPendingReferences(java.base@11.0.13/Reference.java:241)
        at java.lang.ref.Reference$ReferenceHandler.run(java.base@11.0.13/Reference.java:213)

"Finalizer" #3 daemon prio=8 os_prio=1 cpu=0.00ms elapsed=18.72s tid=0x000001d91fab5800 nid=0x2224 in Object.wait()  [0x000000aacf9fe000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.13/Native Method)
        - waiting on <0x0000000623a08fa8> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.13/ReferenceQueue.java:155)
        - waiting to re-lock in wait() <0x0000000623a08fa8> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.13/ReferenceQueue.java:176)
        at java.lang.ref.Finalizer$FinalizerThread.run(java.base@11.0.13/Finalizer.java:170)

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 cpu=0.00ms elapsed=18.70s tid=0x000001d91fb2b800 nid=0x3bcc runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Attach Listener" #5 daemon prio=5 os_prio=2 cpu=0.00ms elapsed=18.70s tid=0x000001d91fb2c800 nid=0x3740 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Service Thread" #6 daemon prio=9 os_prio=0 cpu=0.00ms elapsed=18.70s tid=0x000001d91fb2e000 nid=0xd0c runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #7 daemon prio=9 os_prio=2 cpu=0.00ms elapsed=18.70s tid=0x000001d91fb31000 nid=0x1620 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"C1 CompilerThread0" #10 daemon prio=9 os_prio=2 cpu=0.00ms elapsed=18.70s tid=0x000001d91fb32800 nid=0x133c waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"Sweeper thread" #11 daemon prio=9 os_prio=2 cpu=0.00ms elapsed=18.70s tid=0x000001d91fb35800 nid=0x1368 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Common-Cleaner" #12 daemon prio=8 os_prio=1 cpu=0.00ms elapsed=18.67s tid=0x000001d91fcb6800 nid=0x1df8 in Object.wait()  [0x000000aad01fe000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(java.base@11.0.13/Native Method)
        - waiting on <0x0000000623bf37f8> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(java.base@11.0.13/ReferenceQueue.java:155)
        - waiting to re-lock in wait() <0x0000000623bf37f8> (a java.lang.ref.ReferenceQueue$Lock)
        at jdk.internal.ref.CleanerImpl.run(java.base@11.0.13/CleanerImpl.java:148)
        at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)
        at jdk.internal.misc.InnocuousThread.run(java.base@11.0.13/InnocuousThread.java:134)

"Thread-0" #13 prio=5 os_prio=0 cpu=0.00ms elapsed=18.67s tid=0x000001d91fcbc000 nid=0x39d4 waiting for monitor entry  [0x000000aad02ff000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at DeadLockTest.run(DeadLockTest.java:25)
        - waiting to lock <0x0000000623bf7078> (a java.lang.Object)
        - locked <0x0000000623bf7068> (a java.lang.Object)
        at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)

"Thread-1" #14 prio=5 os_prio=0 cpu=0.00ms elapsed=18.67s tid=0x000001d91fcbc800 nid=0x7f8 waiting for monitor entry  [0x000000aad03ff000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at DeadLockTest.run(DeadLockTest.java:37)
        - waiting to lock <0x0000000623bf7068> (a java.lang.Object)
        - locked <0x0000000623bf7078> (a java.lang.Object)
        at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)

"DestroyJavaVM" #15 prio=5 os_prio=0 cpu=15.63ms elapsed=18.67s tid=0x000001d972982000 nid=0x5744 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"VM Thread" os_prio=2 cpu=0.00ms elapsed=18.73s tid=0x000001d91fa8f800 nid=0x222c runnable

"GC Thread#0" os_prio=2 cpu=0.00ms elapsed=18.77s tid=0x000001d972996800 nid=0x5144 runnable

"G1 Main Marker" os_prio=2 cpu=0.00ms elapsed=18.77s tid=0x000001d972a17800 nid=0x4180 runnable

"G1 Conc#0" os_prio=2 cpu=0.00ms elapsed=18.77s tid=0x000001d972a19000 nid=0x3380 runnable

"G1 Refine#0" os_prio=2 cpu=0.00ms elapsed=18.75s tid=0x000001d97fde5800 nid=0x2ba4 runnable

"G1 Young RemSet Sampling" os_prio=2 cpu=0.00ms elapsed=18.75s tid=0x000001d97fde6800 nid=0x2f8c runnable
"VM Periodic Task Thread" os_prio=2 cpu=0.00ms elapsed=18.67s tid=0x000001d91fcb6000 nid=0x2990 waiting on condition

JNI global refs: 6, weak refs: 0


Found one Java-level deadlock:
=============================
"Thread-0":
  waiting to lock monitor 0x000001d91fabff80 (object 0x0000000623bf7078, a java.lang.Object),
  which is held by "Thread-1"
"Thread-1":
  waiting to lock monitor 0x000001d91fabcc80 (object 0x0000000623bf7068, a java.lang.Object),
  which is held by "Thread-0"

Java stack information for the threads listed above:
===================================================
"Thread-0":
        at DeadLockTest.run(DeadLockTest.java:25)
        - waiting to lock <0x0000000623bf7078> (a java.lang.Object)
        - locked <0x0000000623bf7068> (a java.lang.Object)
        at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)
"Thread-1":
        at DeadLockTest.run(DeadLockTest.java:37)
        - waiting to lock <0x0000000623bf7068> (a java.lang.Object)
        - locked <0x0000000623bf7078> (a java.lang.Object)
        at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)

Found 1 deadlock.

说明:

Thread-1:线程名
prio:优先级
os_prio:操作系统级别的线程优先级
tid:线程id
nid:线程对应本地线程id
java.lang.Thread.State:线程状态

可以看到有一个 dead lock
Found one Java-level deadlock:
jstack还帮我们打印了死锁产生的原因
打印了死锁产生的原因之外,还帮我们定位到了java的代码行数:

Found one Java-level deadlock:
=============================
"Thread-0":
  waiting to lock monitor 0x000001d91fabff80 (object 0x0000000623bf7078, a java.lang.Object),
  which is held by "Thread-1"
"Thread-1":
  waiting to lock monitor 0x000001d91fabcc80 (object 0x0000000623bf7068, a java.lang.Object),
  which is held by "Thread-0"

Java stack information for the threads listed above:
===================================================
"Thread-0":
        at DeadLockTest.run(DeadLockTest.java:25)
        - waiting to lock <0x0000000623bf7078> (a java.lang.Object)
        - locked <0x0000000623bf7068> (a java.lang.Object)
        at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)
"Thread-1":
        at DeadLockTest.run(DeadLockTest.java:37)
        - waiting to lock <0x0000000623bf7068> (a java.lang.Object)
        - locked <0x0000000623bf7078> (a java.lang.Object)
        at java.lang.Thread.run(java.base@11.0.13/Thread.java:834)

Found 1 deadlock.

参考:
https://juejin.cn/post/6957903936657293319#heading-3

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/126179.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Pandas数据预处理Pandas合并数据集在线闯关_头歌实践教学平台

Pandas数据预处理合并数据集 第1关 Concat与Append操作第2关 合并与连接第3关 案例&#xff1a;美国各州的统计数据 第1关 Concat与Append操作 任务描述 本关任务&#xff1a;使用read_csv()读取两个csv文件中的数据&#xff0c;将两个数据集合并&#xff0c;将索引设为Ladder…

element ui:常用的组件使用情况记录

前言 将element ui使用过程中一些常用的组件使用情况记录如下 组件 el-tree树组件 树父子节点成一列显示 没有进行设置之前显示效果 设置之后显示效果 ​​​​ 主要代码如下 <el-treeicon-class"none"expand-on-click-node"false"style"…

震裕科技-300953 三季报分析(20231108)

震裕科技-300953 基本情况 公司名称&#xff1a;宁波震裕科技股份有限公司 A股简称&#xff1a;震裕科技 成立日期&#xff1a;1994-10-18 上市日期&#xff1a;2021-03-18 所属行业&#xff1a;专用设备制造业 周期性&#xff1a;0 主营业务&#xff1a;精密级进冲压模具及下游…

Word通过Adobe打印PDF时总是报错,打开记事本

Word文档打印&#xff0c;选择Adobe作为打印机&#xff0c;打印过程中总是报错&#xff0c;不断打开记事本&#xff0c;提示打印出错&#xff0c;错误信息如下&#xff1a; %%[ ProductName: Distiller ]%% %%[Page: 1]%% %%[Page: 2]%% %%[ Error: invalidfont; OffendingCom…

Scala中编写多线程爬虫程序并做可视化处理

在Scala中编写一个爬虫程序来爬取店铺商品并进行可视化处理&#xff0c;需要使用Selenium和Jsoup库来操作网页。在这个例子中&#xff0c;我们将使用多线程来提高爬取速度。 1、首先&#xff0c;我们需要引入所需的库&#xff1a; import org.openqa.selenium.By import org.o…

【Unity之UI编程】在Unity中如何打图集,来降低DrowCall

&#x1f468;‍&#x1f4bb;个人主页&#xff1a;元宇宙-秩沅 &#x1f468;‍&#x1f4bb; hallo 欢迎 点赞&#x1f44d; 收藏⭐ 留言&#x1f4dd; 加关注✅! &#x1f468;‍&#x1f4bb; 本文由 秩沅 原创 &#x1f468;‍&#x1f4bb; 收录于专栏&#xff1a;UI_…

Mysql 不同存储引擎数据文件的形式详解

目录 MyISAM MERGE InnoDB Memory Archive CSV BLACKHOLE MySQL 中的每一个数据表在磁盘上至少被表示为一个文件&#xff0c;即存放着该数据表结构定义的 .frm 文件。不同的存储引擎还有其它用来存放数据和索引信息的文件。 从 MySQL 8.0 版本开始&#xff0c;frm 表结构…

[HCTF 2018]WarmUp全网最详细解释

查看源码找到提示 访问source.php 代码审计&#xff1a; class emmm{public static function checkFile(&$page){$whitelist ["source">"source.php","hint">"hint.php"]; 定义了一个名为emmm的类&#xff0c;在该类中有…

Linux之IPC通信共享内存与消息队列、管道、信号量、socket内存拷贝实例总结(六十二)

简介&#xff1a; CSDN博客专家&#xff0c;专注Android/Linux系统&#xff0c;分享多mic语音方案、音视频、编解码等技术&#xff0c;与大家一起成长&#xff01; 优质专栏&#xff1a;Audio工程师进阶系列【原创干货持续更新中……】&#x1f680; 人生格言&#xff1a; 人生…

射频功率放大器应用中GaN HEMT的表面电势模型

标题&#xff1a;A surface-potential based model for GaN HEMTs in RF power amplifier applications 来源&#xff1a;IEEE IEDM 2010 本文中的任何第一人称都为论文的直译 摘要&#xff1a;我们提出了第一个基于表面电位的射频GaN HEMTs紧凑模型&#xff0c;并将我们的工…

ChatGPT如何管理对话历史?

问题 由于现在开始大量使用ChatGPT对话功能&#xff0c;认识到他在提供启发方面具有一定价值。比如昨天我问他关于一个微习惯的想法&#xff0c;回答的内容还是很实在&#xff0c;而且能够通过他的表达理解自己的问题涉及到的领域是什么。 此外&#xff0c;ChatGPT能够总结对话…

96 前缀树Trie

前缀树 题解1 STL题解2 参考官方 Trie&#xff08;发音类似 “try”&#xff09;或者说 前缀树 是一种树形数据结构&#xff0c;用于高效地存储和检索字符串数据集中的键。这一数据结构有相当多的应用情景&#xff0c;例如自动补完和拼写检查。 请你实现 Trie 类&#xff1a; …

强化IP地址管理措施:确保网络安全与高效性

IP地址管理是网络安全和性能管理的关键组成部分。有效的IP地址管理可以帮助企业确保网络的可用性、安全性和高效性。本文将介绍一些强化IP地址管理的关键措施&#xff0c;以帮助企业提高其网络的安全性和效率。 1. IP地址规划 良好的IP地址规划是强化IP地址管理的基础。它涉及…

中断 NVIC的概念和原理

1.什么是中断 中断&#xff1a; 由于中断源的触发&#xff0c;常规程序被打断&#xff0c; CPU转 而运行中断响应函数&#xff0c;而后又回到常规程序的执行&#xff0c; 这一过程叫做中断。 中断优先级的概念 中断的意义和作用 中断处理的过程和术语 STM32 GPIO外部中断简…

宠物商店系统《宠物之家》,巨完善

源码下载地址 支持&#xff1a;远程部署/安装/调试、讲解、二次开发/修改/定制 系统分为用户端和管理员端。 截图中有些图片加载失败&#xff0c;是因为没有上传图片&#xff0c;登录管理员账号上传图片后&#xff0c;图片显示会变成正常。 web的宠物商城系统《宠物之家》。系…

mysql千万数据快速插入-实战

文章目录 前言环境一、配置二、效果总结 前言 数据量太大了&#xff0c;每天半夜要同步很大数据到 mysql 数据库&#xff0c;其中一张表就上2千万&#xff0c;总计上亿条数据。同步任务每天0点之后开始任务&#xff08;因为到0之后才能统计前一天数据&#xff09;&#xff0c;…

Antv/G2 图表背景实线改为虚线

坐标轴 - Axis 文档 绘图属性 - ShapeAttrs 文档 图表背景实线改为虚线代码示例&#xff1a; chart.axis("value", {grid: {// 背景网格刻度线样式line: {style: {lineWidth: 0.5,lineDash: [5, 2], //虚线},},}, });未设置前页面效果&#xff1a; 添加代码配置&…

AutoGen 智能应用开发(一)|AutoGen 基础

点击蓝字 关注我们 编辑&#xff1a;Alan Wang 排版&#xff1a;Rani Sun 微软 Reactor 为帮助广开发者&#xff0c;技术爱好者&#xff0c;更好的学习 .NET Core, C#, Python&#xff0c;数据科学&#xff0c;机器学习&#xff0c;AI&#xff0c;区块链, IoT 等技术&#xff0…

智慧社区大屏:连接社区生活的数字桥梁

随着科技的不断发展&#xff0c;智慧社区已经不再只是未来的概念&#xff0c;它已经在我们的眼前悄然崭露头角。智慧社区是一种基于数字技术的社区管理和生活方式&#xff0c;旨在提高社区的安全性、便利性和生活质量。而在这个数字化的社区中&#xff0c;智慧社区大屏起到了连…

基于Qt窗口文件新建_编辑_打开_保存_另存_剪切和复制和粘贴项目(文件操作直接套源码)

# .pro文件 QT += widgetsrequires(qtConfig(filedialog))​HEADERS = mainwindow.hSOURCES = main.cpp \ mainwindow.cppRESOURCES = sdi.qrc​# installtarget.path = $$[QT_INSTALL_EXAMPLES]/widgets/mainwindows/sdiINSTALLS += target​…