Add option "memory" to command /debug

v2.8-utf8proc
Sebastien Helleu 2011-02-10 18:37:12 +01:00
parent aae8a2e54c
commit 2ef6fdb2a1
21 changed files with 205 additions and 74 deletions

View File

@ -7,6 +7,7 @@ v0.3.5-dev, 2011-02-10
Version 0.3.5 (under dev!)
--------------------------
* core: add option "memory" to command /debug
* core: add option weechat.look.read_marker_string
* core: improve display of commands lists in /help (add arguments -list
and -listfull) (task #10299)

View File

@ -21,6 +21,7 @@
#cmakedefine HAVE_BACKTRACE
#cmakedefine ICONV_2ARG_IS_CONST 1
#cmakedefine HAVE_TCL_CREATE_NS
#cmakedefine HAVE_MALLINFO
#define PACKAGE_VERSION "@VERSION@"
#define PACKAGE "@PROJECT_NAME@"
#define PACKAGE_NAME "@PROJECT_NAME@"

View File

@ -96,7 +96,7 @@ AC_MSG_RESULT($ac_cv_type_socklen_t)
# Checks for library functions.
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strndup strncasecmp strpbrk strrchr strstr regexec])
AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strndup strncasecmp strpbrk strrchr strstr regexec mallinfo])
# Variables in config.h

View File

@ -145,17 +145,18 @@ Erweiterung: Name der Erweiterung ('weechat' für interne WeeChat Befehle)
/debug list
set <plugin> <level>
dump [<plugin>]
buffer|windows|term|color
buffer|color|memory|term|windows
list: zeigt alle Erweiterungen mit Debuglevel an
set: setzt den Level der Protokollierung für eine Erweiterung
plugin: Name der Erweiterung ("core" für den WeeChat Kern)
level: Debuglevel der Erweiterung (0 = deaktiviert das Debug)
dump: Speicherabbild in die WeeChat Protokolldatei schreiben (wie bei einem Programmabsturz)
buffer: speichert den Bufferinhalt als hexadezimale Ausgabe in die Protokolldatei
windows: zeigt die Fensterstruktur an
term: gibt Informationen über das Terminal und verfügbare Farben aus.
color: zeigt Informationen über die aktuellen Farbpaarungen an.
list: list plugins with debug levels
set: set debug level for plugin
plugin: name of plugin ("core" for WeeChat core)
level: debug level for plugin (0 = disable debug)
dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)
buffer: dump buffer content with hexadecimal values in log file
color: display infos about current color pairs
memory: display infos about memory usage
term: display infos about terminal
windows: display windows tree
........................................
[command]*`filter`* Filterfunktion um Nachrichten in Buffern zu aus- oder einzublenden, dazu können Tags oder regulären Ausdrücken verwendet werden::

View File

@ -145,7 +145,7 @@ command: command to execute (a '/' is automatically added if not found at beginn
/debug list
set <plugin> <level>
dump [<plugin>]
buffer|windows|term|color
buffer|color|memory|term|windows
list: list plugins with debug levels
set: set debug level for plugin
@ -153,9 +153,10 @@ command: command to execute (a '/' is automatically added if not found at beginn
level: debug level for plugin (0 = disable debug)
dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)
buffer: dump buffer content with hexadecimal values in log file
windows: display windows tree
term: display infos about terminal
color: display infos about current color pairs
memory: display infos about memory usage
term: display infos about terminal
windows: display windows tree
........................................
[command]*`filter`* filter messages in buffers, to hide/show them according to tags or regex::

View File

@ -145,7 +145,7 @@ extension: nom de l'extension ('weechat' pour une commande interne WeeChat)
/debug list
set <extension> <niveau>
dump [<extension>]
buffer|windows|term|color
buffer|color|memory|term|windows
list: lister les extensions avec leur niveau de debug
set: définir le niveau de debug pour l'extension
@ -153,9 +153,10 @@ extension: nom de l'extension ("core" pour le coeur de WeeChat)
niveau: niveau de debug pour l'extension
dump: afficher les variables mémoire WeeChat dans le fichier log (les mêmes messages sont affichés lorsque WeeChat plante)
buffer: afficher le contenu du tampon en valeurs hexadécimales dans le fichier log
windows: afficher l'arbre des fenêtres
term: afficher des infos sur le terminal
color: afficher des infos sur les paires de couleur courantes
memory: afficher des infos sur l'utilisation de la mémoire
term: afficher des infos sur le terminal
windows: afficher l'arbre des fenêtres
........................................
[command]*`filter`* filtrer les messages dans les tampons, pour les cacher/afficher selon des tags ou expressions régulières::

View File

@ -145,7 +145,7 @@ comando: comando da eseguire (una '/' viene aggiunta automaticamente se non trov
/debug list
set <plugin> <level>
dump [<plugin>]
buffer|windows|term|color
buffer|color|memory|term|windows
list: list plugins with debug levels
set: set debug level for plugin
@ -153,9 +153,10 @@ comando: comando da eseguire (una '/' viene aggiunta automaticamente se non trov
level: debug level for plugin (0 = disable debug)
dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)
buffer: dump buffer content with hexadecimal values in log file
windows: display windows tree
term: display infos about terminal
color: display infos about current color pairs
memory: display infos about memory usage
term: display infos about terminal
windows: display windows tree
........................................
[command]*`filter`* filtra messaggi nei buffer, per nascondere/mostrare in base a tag o regexp::

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-02-08 12:28+0100\n"
"POT-Creation-Date: 2011-02-10 17:05+0100\n"
"PO-Revision-Date: 2011-02-07 17:29+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1043,7 +1043,8 @@ msgstr "spřáva ladění pro jádro/pluginy"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|windows|term|color"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
msgstr "[list | set plugin level | dump | buffer | windows | term]"
#, fuzzy
@ -1055,9 +1056,10 @@ msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" color: display infos about current color pairs\n"
" memory: display infos about memory usage\n"
" term: display infos about terminal\n"
" color: display infos about current color pairs"
"windows: display windows tree"
msgstr ""
" set: nastavit úroveň logování pro plugin\n"
" plugin: jméno pluginu (\"core\" pro jádro WeeChat)\n"
@ -2490,6 +2492,12 @@ msgstr "Znovunačítám konfigurační soubor %s"
msgid "Windows tree:"
msgstr "Strom oken:"
msgid "Memory usage (see \"man mallinfo\" for help):"
msgstr ""
msgid "Memory usage not available (function \"mallinfo\" not found)"
msgstr ""
#, c-format
msgid "%sError: another command \"%s\" already exists for plugin \"%s\""
msgstr "%sChyba: příkaz \"%s\" již existuje pro plugin \"%s\""

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-02-09 11:46+0100\n"
"POT-Creation-Date: 2011-02-10 17:05+0100\n"
"PO-Revision-Date: 2011-02-09 11:49+0100\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1070,11 +1070,14 @@ msgstr ""
msgid "control debug for core/plugins"
msgstr "Debug-Kontrolle für Hauptprogramm und/oder Erweiterung"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|windows|term|color"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
msgstr ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|windows|term|color"
#, fuzzy
msgid ""
" list: list plugins with debug levels\n"
" set: set debug level for plugin\n"
@ -1083,9 +1086,10 @@ msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" color: display infos about current color pairs\n"
" memory: display infos about memory usage\n"
" term: display infos about terminal\n"
" color: display infos about current color pairs"
"windows: display windows tree"
msgstr ""
" list: zeigt alle Erweiterungen mit Debuglevel an\n"
" set: setzt den Level der Protokollierung für eine Erweiterung\n"
@ -2667,6 +2671,12 @@ msgstr "Konfigurationsdatei %s wird erneut geladen"
msgid "Windows tree:"
msgstr "Fensterstruktur:"
msgid "Memory usage (see \"man mallinfo\" for help):"
msgstr ""
msgid "Memory usage not available (function \"mallinfo\" not found)"
msgstr ""
#, c-format
msgid "%sError: another command \"%s\" already exists for plugin \"%s\""
msgstr ""

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-02-08 12:28+0100\n"
"POT-Creation-Date: 2011-02-10 17:05+0100\n"
"PO-Revision-Date: 2011-02-07 17:29+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1065,7 +1065,8 @@ msgid "control debug for core/plugins"
msgstr "controla los mensajes de depuración para el núcleo/plugins"
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|windows|term|color"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
msgstr ""
#, fuzzy
@ -1077,9 +1078,10 @@ msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" color: display infos about current color pairs\n"
" memory: display infos about memory usage\n"
" term: display infos about terminal\n"
" color: display infos about current color pairs"
"windows: display windows tree"
msgstr ""
" set: configura el nivel de depuración para plugin\n"
" plugin: nombre del plugin (\"core\" para el núcleo de WeeChat)\n"
@ -2551,6 +2553,12 @@ msgstr "Recargando archivo de configuración %s"
msgid "Windows tree:"
msgstr "Árbol de ventanas:"
msgid "Memory usage (see \"man mallinfo\" for help):"
msgstr ""
msgid "Memory usage not available (function \"mallinfo\" not found)"
msgstr ""
#, c-format
msgid "%sError: another command \"%s\" already exists for plugin \"%s\""
msgstr "%sError: el comando \"%s\" ya existe en el plugin \"%s\""

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-02-08 12:28+0100\n"
"PO-Revision-Date: 2011-02-08 12:29+0100\n"
"POT-Creation-Date: 2011-02-10 17:05+0100\n"
"PO-Revision-Date: 2011-02-10 16:46+0100\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@ -1057,10 +1057,11 @@ msgid "control debug for core/plugins"
msgstr "contrôle du debug pour le coeur/les extensions"
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|windows|term|color"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
msgstr ""
"list || set <extension> <niveau> || dump [<extension>] || buffer|windows|"
"term|color"
"list || set <extension> <niveau> || dump [<extension>] || buffer|color|"
"memory|term|windows"
msgid ""
" list: list plugins with debug levels\n"
@ -1070,9 +1071,10 @@ msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" color: display infos about current color pairs\n"
" memory: display infos about memory usage\n"
" term: display infos about terminal\n"
" color: display infos about current color pairs"
"windows: display windows tree"
msgstr ""
" list: lister les extensions avec leur niveau de debug\n"
" set: définir le niveau de debug pour l'extension\n"
@ -1082,9 +1084,10 @@ msgstr ""
"mêmes messages sont affichés lorsque WeeChat plante)\n"
" buffer: afficher le contenu du tampon en valeurs hexadécimales dans le "
"fichier log\n"
" windows: afficher l'arbre des fenêtres\n"
" color: afficher des infos sur les paires de couleur courantes\n"
" memory: afficher des infos sur l'utilisation de la mémoire\n"
" term: afficher des infos sur le terminal\n"
" color: afficher des infos sur les paires de couleur courantes"
" windows: afficher l'arbre des fenêtres"
msgid ""
"filter messages in buffers, to hide/show them according to tags or regex"
@ -2616,6 +2619,12 @@ msgstr "Rechargement du fichier de configuration %s"
msgid "Windows tree:"
msgstr "Arbre des fenêtres:"
msgid "Memory usage (see \"man mallinfo\" for help):"
msgstr "Utilisation mémoire (voir \"man mallinfo\" pour de l'aide) :"
msgid "Memory usage not available (function \"mallinfo\" not found)"
msgstr "Utilisation mémoire non disponible (fonction \"mallinfo\" non trouvée)"
#, c-format
msgid "%sError: another command \"%s\" already exists for plugin \"%s\""
msgstr ""

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-02-08 12:28+0100\n"
"POT-Creation-Date: 2011-02-10 17:05+0100\n"
"PO-Revision-Date: 2011-02-07 17:29+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1017,7 +1017,8 @@ msgstr ""
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|windows|term|color"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
msgstr "dump | buffer | windows"
#, fuzzy
@ -1029,9 +1030,10 @@ msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" color: display infos about current color pairs\n"
" memory: display infos about memory usage\n"
" term: display infos about terminal\n"
" color: display infos about current color pairs"
"windows: display windows tree"
msgstr ""
" dump: memóriatartalom mentése a WeeChat logba (ugyanez a tartalom íródik "
"a WeeChat összeomlásakor)\n"
@ -2287,6 +2289,12 @@ msgstr "Beállítások mentése a lemezre\n"
msgid "Windows tree:"
msgstr "a /who lista vége"
msgid "Memory usage (see \"man mallinfo\" for help):"
msgstr ""
msgid "Memory usage not available (function \"mallinfo\" not found)"
msgstr ""
#, fuzzy, c-format
msgid "%sError: another command \"%s\" already exists for plugin \"%s\""
msgstr "%s az ignore már létezik\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-02-08 12:28+0100\n"
"POT-Creation-Date: 2011-02-10 17:05+0100\n"
"PO-Revision-Date: 2011-02-07 17:29+0100\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1058,7 +1058,8 @@ msgid "control debug for core/plugins"
msgstr "attiva debug per core/plugin"
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|windows|term|color"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
msgstr ""
#, fuzzy
@ -1070,9 +1071,10 @@ msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" color: display infos about current color pairs\n"
" memory: display infos about memory usage\n"
" term: display infos about terminal\n"
" color: display infos about current color pairs"
"windows: display windows tree"
msgstr ""
" set: imposta il livello di log per il plugin\n"
" plugin: nome del plugin (\"core\" per il core di WeeChat)\n"
@ -2555,6 +2557,12 @@ msgstr "Ricaricamento del file di configurazione %s"
msgid "Windows tree:"
msgstr "Albero delle finestre:"
msgid "Memory usage (see \"man mallinfo\" for help):"
msgstr ""
msgid "Memory usage not available (function \"mallinfo\" not found)"
msgstr ""
#, c-format
msgid "%sError: another command \"%s\" already exists for plugin \"%s\""
msgstr "%sErrore: un altro comando \"%s\" esiste già per il plugin \"%s\""

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-02-08 12:28+0100\n"
"POT-Creation-Date: 2011-02-10 17:05+0100\n"
"PO-Revision-Date: 2011-02-07 17:29+0100\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1071,7 +1071,8 @@ msgid "control debug for core/plugins"
msgstr "kontrola debugu dla rdzenia/wtyczek"
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|windows|term|color"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
msgstr ""
#, fuzzy
@ -1083,9 +1084,10 @@ msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" color: display infos about current color pairs\n"
" memory: display infos about memory usage\n"
" term: display infos about terminal\n"
" color: display infos about current color pairs"
"windows: display windows tree"
msgstr ""
" set: ustawia poziom logowania dla wtyczki\n"
" plugin: nazwa wtyczki (\"core\" dla rdzenia WeeChat)\n"
@ -2549,6 +2551,12 @@ msgstr "Przeładowyanie pliku konfoguracyjnego %s"
msgid "Windows tree:"
msgstr "Drzewo okien:"
msgid "Memory usage (see \"man mallinfo\" for help):"
msgstr ""
msgid "Memory usage not available (function \"mallinfo\" not found)"
msgstr ""
#, c-format
msgid "%sError: another command \"%s\" already exists for plugin \"%s\""
msgstr "%sBłąd: istnieje juz inna komenda \"%s\" dla wtyczki \"%s\""

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-02-08 12:28+0100\n"
"POT-Creation-Date: 2011-02-10 17:05+0100\n"
"PO-Revision-Date: 2011-02-07 17:30+0100\n"
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1054,7 +1054,8 @@ msgstr "cotrolar depuração para core/plugins"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|windows|term|color"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
msgstr "[list | set plugin level | dump [plugin] | buffer | windows | term]"
# find a better translation to dump?
@ -1068,9 +1069,10 @@ msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" color: display infos about current color pairs\n"
" memory: display infos about memory usage\n"
" term: display infos about terminal\n"
" color: display infos about current color pairs"
"windows: display windows tree"
msgstr ""
" set: configura o nível de log para o plugin\n"
" plugin: nome do plugin (\"core\" para o core do WeeChat)\n"
@ -2481,6 +2483,12 @@ msgstr ""
msgid "Windows tree:"
msgstr ""
msgid "Memory usage (see \"man mallinfo\" for help):"
msgstr ""
msgid "Memory usage not available (function \"mallinfo\" not found)"
msgstr ""
#, c-format
msgid "%sError: another command \"%s\" already exists for plugin \"%s\""
msgstr ""

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.5-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-02-08 12:28+0100\n"
"POT-Creation-Date: 2011-02-10 17:05+0100\n"
"PO-Revision-Date: 2011-02-07 17:30+0100\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1024,7 +1024,8 @@ msgstr ""
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|windows|term|color"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
msgstr "dump | buffer | windows"
#, fuzzy
@ -1036,9 +1037,10 @@ msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" color: display infos about current color pairs\n"
" memory: display infos about memory usage\n"
" term: display infos about terminal\n"
" color: display infos about current color pairs"
"windows: display windows tree"
msgstr ""
" dump: сохранить дамп памяти в журнал WeeChat (аналогично дампу при крахе "
"WeeChat)\n"
@ -2302,6 +2304,12 @@ msgstr "Сохраняю конфигурацию\n"
msgid "Windows tree:"
msgstr "конец списка /who"
msgid "Memory usage (see \"man mallinfo\" for help):"
msgstr ""
msgid "Memory usage not available (function \"mallinfo\" not found)"
msgstr ""
#, fuzzy, c-format
msgid "%sError: another command \"%s\" already exists for plugin \"%s\""
msgstr "%s игнорирование уже существует\n"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-02-08 12:28+0100\n"
"POT-Creation-Date: 2011-02-10 17:05+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -879,7 +879,8 @@ msgid "control debug for core/plugins"
msgstr ""
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|windows|term|color"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
msgstr ""
msgid ""
@ -890,9 +891,10 @@ msgid ""
" dump: save memory dump in WeeChat log file (same dump is written when "
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
"windows: display windows tree\n"
" color: display infos about current color pairs\n"
" memory: display infos about memory usage\n"
" term: display infos about terminal\n"
" color: display infos about current color pairs"
"windows: display windows tree"
msgstr ""
msgid ""
@ -1962,6 +1964,12 @@ msgstr ""
msgid "Windows tree:"
msgstr ""
msgid "Memory usage (see \"man mallinfo\" for help):"
msgstr ""
msgid "Memory usage not available (function \"mallinfo\" not found)"
msgstr ""
#, c-format
msgid "%sError: another command \"%s\" already exists for plugin \"%s\""
msgstr ""

View File

@ -61,6 +61,7 @@ CHECK_FUNCTION_EXISTS(strncasecmp HAVE_STRNCASECMP)
CHECK_FUNCTION_EXISTS(strpbrk HAVE_STRPBRK)
CHECK_FUNCTION_EXISTS(strrchr HAVE_STRRCHR)
CHECK_FUNCTION_EXISTS(strstr HAVE_STRSTR)
CHECK_FUNCTION_EXISTS(mallinfo HAVE_MALLINFO)
CHECK_INCLUDE_FILES("regex.h" HAVE_REGEX_H)
CHECK_FUNCTION_EXISTS(regexec HAVE_REGEXEC)

View File

@ -1125,17 +1125,21 @@ COMMAND_CALLBACK(debug)
_("Raw content of buffers has been written in log "
"file"));
}
else if (string_strcasecmp (argv[1], "windows") == 0)
else if (string_strcasecmp (argv[1], "color") == 0)
{
debug_windows_tree ();
gui_color_dump (buffer);
}
else if (string_strcasecmp (argv[1], "memory") == 0)
{
debug_memory ();
}
else if (string_strcasecmp (argv[1], "term") == 0)
{
gui_window_term_display_infos ();
}
else if (string_strcasecmp (argv[1], "color") == 0)
else if (string_strcasecmp (argv[1], "windows") == 0)
{
gui_color_dump (buffer);
debug_windows_tree ();
}
else if (string_strcasecmp (argv[1], "set") == 0)
{
@ -4718,7 +4722,7 @@ command_init ()
N_("list"
" || set <plugin> <level>"
" || dump [<plugin>]"
" || buffer|windows|term|color"),
" || buffer|color|memory|term|windows"),
N_(" list: list plugins with debug levels\n"
" set: set debug level for plugin\n"
" plugin: name of plugin (\"core\" for WeeChat core)\n"
@ -4727,16 +4731,18 @@ command_init ()
"dump is written when WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values "
"in log file\n"
"windows: display windows tree\n"
" color: display infos about current color pairs\n"
" memory: display infos about memory usage\n"
" term: display infos about terminal\n"
" color: display infos about current color pairs"),
"windows: display windows tree"),
"list"
" || set %(plugins_names)|core"
" || dump %(plugins_names)|core"
" || buffer"
" || windows"
" || color"
" || memory"
" || term"
" || color",
" || windows",
&command_debug, NULL);
hook_command (NULL, "filter",
N_("filter messages in buffers, to hide/show them according "

View File

@ -26,6 +26,9 @@
#endif
#include <stdlib.h>
#ifdef HAVE_MALLINFO
#include <malloc.h>
#endif
#include "weechat.h"
#include "wee-backtrace.h"
@ -256,6 +259,37 @@ debug_windows_cb (void *data, const char *signal, const char *type_data,
return WEECHAT_RC_OK;
}
/*
* debug_memory: display information about dynamic memory allocation
*/
void
debug_memory ()
{
#ifdef HAVE_MALLINFO
struct mallinfo info;
info = mallinfo ();
gui_chat_printf (NULL, "");
gui_chat_printf (NULL, _("Memory usage (see \"man mallinfo\" for help):"));
gui_chat_printf (NULL, " arena :%10d", info.arena);
gui_chat_printf (NULL, " ordblks :%10d", info.ordblks);
gui_chat_printf (NULL, " smblks :%10d", info.smblks);
gui_chat_printf (NULL, " hblks :%10d", info.hblks);
gui_chat_printf (NULL, " hblkhd :%10d", info.hblkhd);
gui_chat_printf (NULL, " usmblks :%10d", info.usmblks);
gui_chat_printf (NULL, " fsmblks :%10d", info.fsmblks);
gui_chat_printf (NULL, " uordblks:%10d", info.uordblks);
gui_chat_printf (NULL, " fordblks:%10d", info.fordblks);
gui_chat_printf (NULL, " keepcost:%10d", info.keepcost);
#else
gui_chat_printf (NULL,
_("Memory usage not available (function \"mallinfo\" not "
"found)"));
#endif
}
/*
* debug_init: hook signals for debug
*/

View File

@ -24,6 +24,7 @@ struct t_gui_window_tree;
extern void debug_sigsegv ();
extern void debug_windows_tree ();
extern void debug_memory ();
extern void debug_init ();
#endif /* __WEECHAT_DEBUG_H */