-
Notifications
You must be signed in to change notification settings - Fork 819
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into quic-latest
* master: Make tls_conn_timeout test more reliable in CI (#7018) Remove deprecated verify.server for 9.0 (#7040) Updated GitHub description and homepage URL to be https (#7019) Add virtual destructor to QUICTPConfig. (#7036) Fix code to eliminate warning and enable feature (#7031) add a null check to avoid crashing (#7035) Squashed commit of the following: (#7000) Fixed problem with all "forced" volumes cache (#7028) Spacing tweaks to acl_filter_rule::print (#7026) Removes dead code from iocore/dns (#7025) Removes TODO (#7027) Add logic to resolve content-length transfer-encoding conflicts on response (#6992) Add memory_profile plugin (#7014) Fix typos relating to tls_bridge (#7011) slice: clean up of created 502 response header (#6919) Add new API / TSPluginDSOReloadEnable that overrides the configuration variable `proxy.config.plugin.dynamic_reload_mode` for a particular plugin. (#6880) Remove incorrect assert in inactivity timeout handling (#7012) Removes use of SPLIT_DNS macro (#7010) Fixed core when sending back a redirect and having an invalid server response (#7004) slice: fix throttle not work (#7008) Updates to thread scale factor (#7007) Added tasks and launch files for vscode, to configure, build and debug (#7005) NextHop Strategy Refactor and Fixes (#6782) Make the setting of the continuation handler safer. (#6996) ProtocolStack n -> count (#7006) Fix volume/stripe calcs when using forced volumes (#6995) Cleanup: Write error message on diags output instead of stderr (#6997) Conflicts: iocore/net/P_QUICNetVConnection.h iocore/net/P_QUICPacketHandler.h iocore/net/QUICNetProcessor.cc iocore/net/QUICNetVConnection.cc iocore/net/QUICPacketHandler.cc iocore/net/quic/Mock.h iocore/net/quic/QUICCongestionController.h iocore/net/quic/QUICContext.cc iocore/net/quic/QUICContext.h iocore/net/quic/QUICDebugNames.cc iocore/net/quic/QUICFrame.cc iocore/net/quic/QUICHandshake.cc iocore/net/quic/QUICKeyGenerator.h iocore/net/quic/QUICLossDetector.cc iocore/net/quic/QUICLossDetector.h iocore/net/quic/QUICNewRenoCongestionController.cc iocore/net/quic/QUICPacket.cc iocore/net/quic/QUICPacket.h iocore/net/quic/QUICPacketFactory.cc iocore/net/quic/QUICPacketFactory.h iocore/net/quic/QUICRetryIntegrityTag.cc iocore/net/quic/QUICRetryIntegrityTag.h iocore/net/quic/QUICTLS.h iocore/net/quic/QUICTLS_boringssl.cc iocore/net/quic/QUICTLS_openssl.cc iocore/net/quic/QUICTransportParameters.cc iocore/net/quic/QUICTransportParameters.h iocore/net/quic/QUICTypes.cc iocore/net/quic/QUICTypes.h iocore/net/quic/qlog/QLogListener.h iocore/net/quic/test/test_QUICHandshakeProtocol.cc iocore/net/quic/test/test_QUICLossDetector.cc iocore/net/quic/test/test_QUICPacket.cc iocore/net/quic/test/test_QUICPacketFactory.cc iocore/net/quic/test/test_QUICPacketHeaderProtector.cc iocore/net/quic/test/test_QUICStreamManager.cc iocore/net/quic/test/test_QUICVersionNegotiator.cc proxy/http/HttpProxyServerMain.cc src/traffic_quic/quic_client.cc src/tscore/ink_inet.cc
- Loading branch information
Showing
94 changed files
with
2,428 additions
and
1,322 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,6 +170,7 @@ rc/trafficserver.service | |
|
||
.svn/ | ||
.vscode/ | ||
target | ||
|
||
tsxs | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "(gdb) traffic_server", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/src/traffic_server/.libs/traffic_server", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceFolder}", | ||
"environment": [], | ||
"externalConsole": false, | ||
"MIMode": "gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "(gdb) traffic_manager", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/src/traffic_manager/.libs/traffic_manager", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceFolder}", | ||
"environment": [], | ||
"externalConsole": false, | ||
"MIMode": "gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Autoreconf", | ||
"type": "shell", | ||
"command": "autoreconf -if", | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Configure", | ||
"type": "shell", | ||
"command": "./configure --prefix=${workspaceFolder}/target --enable-ccache --enable-experimental-plugins --enable-example-plugins --enable-test-tools --enable-debug --enable-werror ${env:ATS_VSCODE_CONFIGURE}", | ||
"dependsOrder": "sequence", | ||
"dependsOn": ["Autoreconf"], | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"label": "Build", | ||
"type": "shell", | ||
"command": "make -j 16", | ||
"problemMatcher": [ | ||
"$gcc" | ||
], | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "Install", | ||
"type": "shell", | ||
"command": "make -j 16 install", | ||
"problemMatcher": [ | ||
"$gcc" | ||
] | ||
}, | ||
{ | ||
"label": "Test", | ||
"type": "shell", | ||
"command": "make -j 8 test", | ||
"problemMatcher": [ | ||
"$gcc" | ||
], | ||
"group": { | ||
"kind": "test", | ||
"isDefault": true | ||
} | ||
}, | ||
{ | ||
"label": "Full Build", | ||
"dependsOrder": "sequence", | ||
"dependsOn": ["Configure", "Build", "Install"], | ||
"problemMatcher": [ | ||
"$gcc" | ||
] | ||
} | ||
{ | ||
"label": "Dump Enviroment Variables", | ||
"command": "env", | ||
"problemMatcher": [] | ||
} | ||
] | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
Memory_profile Plugin | ||
********************* | ||
|
||
.. Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
This plugin listens for plugin msgs and invokes jemalloc control | ||
operations. | ||
|
||
Installation | ||
============ | ||
|
||
Add the following line to :file:`plugin.config`:: | ||
|
||
memory_profile.so | ||
|
||
In addition, |TS| must be able to read jemalloc configuration | ||
information either through the ``JEMALLOC_CONF`` environment variable | ||
or via the string sym linked to ``/etc/malloc.conf``. | ||
|
||
For example, if the string below is in ``JEMALLOC_CONF`` or in the sym link string, it | ||
enables profiling and indicates that the memory dump prefix is ``/tmp/jeprof``.:: | ||
|
||
prof:true,prof_prefix:/tmp/jeprof | ||
|
||
Details on configuration jemalloc options at `<http://jemalloc.net/jemalloc.3.html>`. | ||
Changes to the configuration in ``JEMALLOC_CONF`` or ``/etc/malloc.conf`` require a process | ||
restart to pick up. | ||
|
||
Plugin Messages | ||
=============== | ||
|
||
The plugin responds to the following mesages sent via traffic_ctl. | ||
|
||
Message Action | ||
========== =================================================================================== | ||
activate Start jemalloc profiling. Useful if prof_active:false was in the configure string. | ||
|
||
deactivate Stop jemalloc profiling. | ||
|
||
dump If profiling is enabled and active, it will generate a profile dump file. | ||
|
||
stats Print jemalloc statistics in traffic.out | ||
|
||
The command below sends the stats message to the plugin causing the current statistics to be written to traffic.out:: | ||
|
||
traffic_ctl plugin msg memory_profile stats | ||
|
||
Example Usage | ||
============= | ||
|
||
If your run time configuration string is:: | ||
|
||
prof:true,prof_prefix:/tmp/jeprof:prof_active:false | ||
|
||
|TS| has started without profile sampling started. Perhaps you didn't want to profile the start up phase of |TS|. To start | ||
you need to send the activate message to the plugin:: | ||
|
||
traffic_ctl plugin msg memory_profile activate | ||
|
||
If your run time configuration string does not indicate that the profiling is not started (e.g. the prof_active field is missing or set to true), you do not | ||
need to send the activate message. | ||
|
||
After waiting sometime for |TS| to gather some memory allocation data, you can send the dump message:: | ||
|
||
traffic_ctl plugin msg memory_profile dump | ||
|
||
This will cause a file containing information about the current state of the |TS| memory allocation to be dumped in a file prefixed | ||
by the value of prof_prefix. In this example, it would be something like ``/tmp/jeprof.1234.0.m0.heap``, where 1234 is the process id | ||
and 0 is a running counter indicating how many dumps have been performed on this process. Each dump is independent of the others | ||
and records the current stat of allocations since the profiling was activated. The dump file can be processed by jeprof | ||
to get text output or graphs. Details of how to use jeprof are in the man pages or `<https://manpages.debian.org/unstable/libjemalloc-dev/jeprof.1.en.html>`. | ||
|
||
You may want to send the dump message periodically to analyze how the |TS| memory allocation changes over time. This periodic dump can also be achieved by setting the | ||
``lg_prof_interval`` option in the run time configuration string. | ||
|
||
If the profiling is taking a significating amount of processing time and affecting |TS| performance, send the deactivate message to turn off profiling.:: | ||
|
||
traffic_ctl plugin msg memory_profile deactivate | ||
|
||
Send the stats message to cause detailed jemalloc stats to be printed in traffic.out. These stats represent actvitiy since the start of the |TS| process.:: | ||
|
||
traffic_ctl plugin msg memory_profile stats | ||
|
||
Limitations | ||
=========== | ||
|
||
Currently the plugin only functions for systems compiled against jemalloc. | ||
Perhaps in the future, it can be augmented to interact with other memory | ||
allocation systems. | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.