- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在运行具有以下设置的 java 应用程序:
-Xms1G -Xmx2G -Xdebug -Xloggc:/usr/local/resin/log/gc.log -XX:+PrintGCDetails -XX:PermSize=150M -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+UseConcMarkSweepGC
我以为打开 -XX:+PrintGCApplicationStoppedTime 开关会输出每次 GC 发生时应用程序停止的时间,但是得到多行日志告诉应用程序在两次次要 GC 之间停止了多少时间,比如以下日志:
Total time for which application threads were stopped: 0.0043330 seconds
Application time: 1410.4236260 seconds
{Heap before GC invocations=636 (full 2):
par new generation total 38336K, used 34123K [0x00002aaab1a60000, 0x00002aaab43f0000, 0x00002aaab43f0000)
eden space 34112K, 100% used [0x00002aaab1a60000, 0x00002aaab3bb0000, 0x00002aaab3bb0000)
from space 4224K, 0% used [0x00002aaab3bb0000, 0x00002aaab3bb2de0, 0x00002aaab3fd0000)
to space 4224K, 0% used [0x00002aaab3fd0000, 0x00002aaab3fd0000, 0x00002aaab43f0000)
concurrent mark-sweep generation total 1006016K, used 208278K [0x00002aaab43f0000, 0x00002aaaf1a60000, 0x00002aab31a60000)
concurrent-mark-sweep perm gen total 153600K, used 90763K [0x00002aab31a60000, 0x00002aab3b060000, 0x00002aab3b060000)
122682.024: [GC 122682.024: [ParNew
Desired survivor size 2162688 bytes, new threshold 4 (max 4)
- age 1: 4896 bytes, 4896 total
- age 2: 2272 bytes, 7168 total
: 34123K->10K(38336K), 0.0037720 secs] 242402K->208291K(1044352K), 0.0038540 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
Heap after GC invocations=637 (full 2):
par new generation total 38336K, used 10K [0x00002aaab1a60000, 0x00002aaab43f0000, 0x00002aaab43f0000)
eden space 34112K, 0% used [0x00002aaab1a60000, 0x00002aaab1a60000, 0x00002aaab3bb0000)
from space 4224K, 0% used [0x00002aaab3fd0000, 0x00002aaab3fd2bf8, 0x00002aaab43f0000)
to space 4224K, 0% used [0x00002aaab3bb0000, 0x00002aaab3bb0000, 0x00002aaab3fd0000)
concurrent mark-sweep generation total 1006016K, used 208280K [0x00002aaab43f0000, 0x00002aaaf1a60000, 0x00002aab31a60000)
concurrent-mark-sweep perm gen total 153600K, used 90763K [0x00002aab31a60000, 0x00002aab3b060000, 0x00002aab3b060000)
}
Total time for which application threads were stopped: 0.0044760 seconds
Application time: 317.6313600 seconds
Total time for which application threads were stopped: 0.0004960 seconds
Application time: 86.5483550 seconds
Total time for which application threads were stopped: 0.0005090 seconds
Application time: 0.0001400 seconds
Total time for which application threads were stopped: 0.0001360 seconds
Application time: 46.6827150 seconds
Total time for which application threads were stopped: 0.0004430 seconds
Application time: 74.2952540 seconds
Total time for which application threads were stopped: 0.0004940 seconds
Application time: 0.0001300 seconds
Total time for which application threads were stopped: 0.0001130 seconds
Application time: 0.0001290 seconds
Total time for which application threads were stopped: 0.0001290 seconds
Application time: 51.1991810 seconds
Total time for which application threads were stopped: 0.0004860 seconds
Application time: 190.7426760 seconds
Total time for which application threads were stopped: 0.0004930 seconds
Application time: 0.0000750 seconds
Total time for which application threads were stopped: 0.0001000 seconds
Application time: 55.4635280 seconds
Total time for which application threads were stopped: 0.0004900 seconds
Application time: 180.7308270 seconds
Total time for which application threads were stopped: 0.0005060 seconds
Application time: 60.9953830 seconds
Total time for which application threads were stopped: 0.0005490 seconds
Application time: 60.9591480 seconds
Total time for which application threads were stopped: 0.0006410 seconds
Application time: 292.0577720 seconds
{Heap before GC invocations=637 (full 2):
par new generation total 38336K, used 34122K [0x00002aaab1a60000, 0x00002aaab43f0000, 0x00002aaab43f0000)
eden space 34112K, 100% used [0x00002aaab1a60000, 0x00002aaab3bb0000, 0x00002aaab3bb0000)
from space 4224K, 0% used [0x00002aaab3fd0000, 0x00002aaab3fd2bf8, 0x00002aaab43f0000)
to space 4224K, 0% used [0x00002aaab3bb0000, 0x00002aaab3bb0000, 0x00002aaab3fd0000)
concurrent mark-sweep generation total 1006016K, used 208280K [0x00002aaab43f0000, 0x00002aaaf1a60000, 0x00002aab31a60000)
concurrent-mark-sweep perm gen total 153600K, used 90763K [0x00002aab31a60000, 0x00002aab3b060000, 0x00002aab3b060000)
124099.341: [GC 124099.341: [ParNew
Desired survivor size 2162688 bytes, new threshold 4 (max 4)
- age 1: 20680 bytes, 20680 total
- age 3: 808 bytes, 21488 total
: 34122K->25K(38336K), 0.0036900 secs] 242403K->208305K(1044352K), 0.0037700 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
Heap after GC invocations=638 (full 2):
par new generation total 38336K, used 25K [0x00002aaab1a60000, 0x00002aaab43f0000, 0x00002aaab43f0000)
eden space 34112K, 0% used [0x00002aaab1a60000, 0x00002aaab1a60000, 0x00002aaab3bb0000)
from space 4224K, 0% used [0x00002aaab3bb0000, 0x00002aaab3bb6488, 0x00002aaab3fd0000)
to space 4224K, 0% used [0x00002aaab3fd0000, 0x00002aaab3fd0000, 0x00002aaab43f0000)
concurrent mark-sweep generation total 1006016K, used 208280K [0x00002aaab43f0000, 0x00002aaaf1a60000, 0x00002aab31a60000)
concurrent-mark-sweep perm gen total 153600K, used 90763K [0x00002aab31a60000, 0x00002aab3b060000, 0x00002aab3b060000)
}
为什么两次minor GC之间有多行连续的“Total time for which the application threads are stopped”和“Application Time”日志。它们的每一行与什么有关?没有详细输出的GC?还是不是GC引起的?
如果我想知道我的应用程序在 GC 期间停止的总时间,我应该将所有这些日志中的时间相加吗?
最佳答案
使用-XX:+PrintSafepointStatistics
找出每个安全点的原因,链接在this answer显示从何处获取可导致到达安全点的完整列表。
关于java - 为什么两次minor GC之间有多个 "Total time for which application threads were stopped"日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6870180/
我将从 ColdFusion 8 迁移到 ColdFusion 10。 目前,在我的Unix根目录下,我只有1个Application.cfm,在这个根目录下我有大约10个子目录(以前的程序员就是这样
这个问题在这里已经有了答案: Is it possible to write a program in Java without main() using JDK 1.7 or higher? [d
我是编写 Windows 服务应用程序的新手,并且遇到了问题。 我用 Delphi 编写了一个普通的 Windows 应用程序来检查和调试代码的主要部分,现在必须将其转换为 NT 服务。 我的代码必须
我在 Visual Studio 2013 中运行它。 对于 Application.Current.Shutdown 我得到: “Application”是“System.Windows.Appli
给定以下 C++ 代码“mini.cpp”: #include "iostream" using namespace std; int main() { cout << "Hello Worl
什么是“服务器应用程序”?我被要求写一篇关于“服务器应用程序”中的错误的文章,但我不熟悉确切的术语。它们只是网络应用程序,还是其他东西? 最佳答案 “服务器应用程序”是一种应用程序,它等待来自其他应用
JavaFX 应用程序类必须扩展 javafx.application.Application package automationFramework import java.util.concurr
I have implemented deeplinking in my application that open my app (if available) but my app opens
我被困在一个非常基本的问题上。我使用 JavaFX 创建了一个简单的 hello world 程序,它在 JDK 1.8 上运行良好。但是当我切换到 JDK-11 时,它会抛出以下异常: Error:
我可以让Application Insights显示正在运行的每小时使用情况日志,但是有没有一种方法可以每小时显示一次平均使用情况,以查看必须在一天中的哪个时段使用网站? 最佳答案 在您的资源的概览
有谁知道为什么在.NET应用程序中实现Application Insights时不会收集用户代理信息,却能够在浏览器中收集统计信息? 我很希望能够针对特定的用户代理字符串过滤出请求,但是看起来我无法看
我有多个应用程序使用 Application Insights for Production Data。我正在尝试使用 City 遥测字段来映射我们当前的用户。这些数据的跟踪似乎非常不一致,并且在大多
有没有办法在 ASP.NET Web 应用程序中禁用 Application Insights?假设我想关闭生产中运行的应用程序中的所有数据收集。 最佳答案 如果 ikey 在 Application
如何在 Azure Application Insights 中将时差转换为毫秒 let startTime = todatetime('2017-05-15T17:02:23.7148691Z');
我正在修改一个用 Coldfusion 编码的现有 Web 应用程序。在现有代码中,大部分文件夹包含一个 Application.cfm 文件,该文件设置应用程序变量 但是,我对这些应用程序的部分修改
我在 Application Insights Analytics 中有一些数据,它有一个动态对象作为自定义维度的属性。例如: | timestamp | name
首先,我需要的是-n WebBrowser-s,每个都在自己的窗口中执行自己的工作。用户应该能够看到所有这些内容,或者仅看到其中一个(或不显示任何内容),并且能够对每一个执行命令。有一个主要形式,没有
我已收到以下代码以添加到封闭代码(受密码保护)中,以便可以发现错误。 On Error Resume Next: Err.Clear Application.SetOption "Error Trap
我正在使用 Delphi 7。我试图在非 VCL 单元中添加一个调用“application.processmessages”的过程。我收到错误“未声明的标识符:应用程序”。 如何从非 vcl 单元引
考虑一个非外汇现有应用程序,我们将其称为Business。 Business 公开一个 Model 对象,该对象又公开一些属性。 Model 还接受这些属性的监听器。 我的问题是关于向此类应用程序添加
我是一名优秀的程序员,十分优秀!