* minor fixes for talloc leak logging
@ 2013-01-29 12:13 david
2013-01-29 12:13 ` [PATCH 1/2] man: document NOTMUCH_TALLOC_REPORT environment variable david
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: david @ 2013-01-29 12:13 UTC (permalink / raw)
To: notmuch
These are the remaining unapplied patches from
id:1358619958-21209-1-git-send-email-david@tethera.net
They are rebased to omit the actual command line argument, as suggested by
id:87d2wzwmd9.fsf@servo.finestructure.net
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] man: document NOTMUCH_TALLOC_REPORT environment variable
2013-01-29 12:13 minor fixes for talloc leak logging david
@ 2013-01-29 12:13 ` david
2013-01-29 20:47 ` Jameson Graef Rollins
2013-01-29 12:13 ` [PATCH 2/2] CLI: add simple error handling for talloc logging david
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: david @ 2013-01-29 12:13 UTC (permalink / raw)
To: notmuch; +Cc: David Bremner
From: David Bremner <bremner@debian.org>
---
man/man1/notmuch.1 | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/man/man1/notmuch.1 b/man/man1/notmuch.1
index 0805be8..55e2d16 100644
--- a/man/man1/notmuch.1
+++ b/man/man1/notmuch.1
@@ -147,6 +147,14 @@ behavior of notmuch.
.B NOTMUCH_CONFIG
Specifies the location of the notmuch configuration file. Notmuch will
use ${HOME}/.notmuch\-config if this variable is not set.
+
+.TP
+.B NOTMUCH_TALLOC_REPORT
+Location to write a talloc memory usage report. See
+.B talloc_enable_leak_report_full
+in \fBtalloc\fR(3)
+for more information.
+
.SH SEE ALSO
\fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] CLI: add simple error handling for talloc logging
2013-01-29 12:13 minor fixes for talloc leak logging david
2013-01-29 12:13 ` [PATCH 1/2] man: document NOTMUCH_TALLOC_REPORT environment variable david
@ 2013-01-29 12:13 ` david
2013-01-29 12:21 ` minor fixes for talloc leak logging Tomi Ollila
2013-02-09 2:03 ` David Bremner
3 siblings, 0 replies; 9+ messages in thread
From: david @ 2013-01-29 12:13 UTC (permalink / raw)
To: notmuch; +Cc: David Bremner
From: David Bremner <bremner@debian.org>
This really should have been there before. I think it's better to do
the actual operation and then possibly fail writing the memory log,
but it would not be too hard to change it to abort earlier.
---
notmuch.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/notmuch.c b/notmuch.c
index a674481..cfb009b 100644
--- a/notmuch.c
+++ b/notmuch.c
@@ -294,10 +294,6 @@ main (int argc, char *argv[])
ret = (command->function)(local, argc - opt_index, argv + opt_index);
- /* in the future support for this environment variable may
- * be supplemented or replaced by command line arguments
- * --leak-report and/or --leak-report-full */
-
talloc_report = getenv ("NOTMUCH_TALLOC_REPORT");
/* this relies on the previous call to
@@ -305,7 +301,13 @@ main (int argc, char *argv[])
if (talloc_report && strcmp (talloc_report, "") != 0) {
FILE *report = fopen (talloc_report, "w");
- talloc_report_full (NULL, report);
+ if (report) {
+ talloc_report_full (NULL, report);
+ } else {
+ ret = 1;
+ fprintf (stderr, "ERROR: unable to write talloc log. ");
+ perror (talloc_report);
+ }
}
return ret;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: minor fixes for talloc leak logging
2013-01-29 12:13 minor fixes for talloc leak logging david
2013-01-29 12:13 ` [PATCH 1/2] man: document NOTMUCH_TALLOC_REPORT environment variable david
2013-01-29 12:13 ` [PATCH 2/2] CLI: add simple error handling for talloc logging david
@ 2013-01-29 12:21 ` Tomi Ollila
2013-02-09 2:03 ` David Bremner
3 siblings, 0 replies; 9+ messages in thread
From: Tomi Ollila @ 2013-01-29 12:21 UTC (permalink / raw)
To: david, notmuch
On Tue, Jan 29 2013, david@tethera.net wrote:
> These are the remaining unapplied patches from
>
> id:1358619958-21209-1-git-send-email-david@tethera.net
>
> They are rebased to omit the actual command line argument, as suggested by
>
> id:87d2wzwmd9.fsf@servo.finestructure.net
LGTM.
Tomi
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] man: document NOTMUCH_TALLOC_REPORT environment variable
2013-01-29 12:13 ` [PATCH 1/2] man: document NOTMUCH_TALLOC_REPORT environment variable david
@ 2013-01-29 20:47 ` Jameson Graef Rollins
2013-01-29 21:01 ` David Bremner
2013-04-15 14:26 ` [PATCH] man: document NOTMUCH_DEBUG_QUERY david
0 siblings, 2 replies; 9+ messages in thread
From: Jameson Graef Rollins @ 2013-01-29 20:47 UTC (permalink / raw)
To: notmuch
[-- Attachment #1: Type: text/plain, Size: 326 bytes --]
On Tue, Jan 29 2013, david@tethera.net wrote:
> +.B NOTMUCH_TALLOC_REPORT
> +Location to write a talloc memory usage report. See
> +.B talloc_enable_leak_report_full
> +in \fBtalloc\fR(3)
> +for more information.
Not for this series, but it might be nice to document usage of the
NOTMUCH_DEBUG_QUERY env var as well.
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] man: document NOTMUCH_TALLOC_REPORT environment variable
2013-01-29 20:47 ` Jameson Graef Rollins
@ 2013-01-29 21:01 ` David Bremner
2013-04-15 14:26 ` [PATCH] man: document NOTMUCH_DEBUG_QUERY david
1 sibling, 0 replies; 9+ messages in thread
From: David Bremner @ 2013-01-29 21:01 UTC (permalink / raw)
To: Jameson Graef Rollins, notmuch
Jameson Graef Rollins <jrollins@finestructure.net> writes:
>
> Not for this series, but it might be nice to document usage of the
> NOTMUCH_DEBUG_QUERY env var as well.
>
Not a bad idea. This should (also?) be documented in the library
documentation, since it is handled there, and also available e.g. to
bindings users.
d
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: minor fixes for talloc leak logging
2013-01-29 12:13 minor fixes for talloc leak logging david
` (2 preceding siblings ...)
2013-01-29 12:21 ` minor fixes for talloc leak logging Tomi Ollila
@ 2013-02-09 2:03 ` David Bremner
3 siblings, 0 replies; 9+ messages in thread
From: David Bremner @ 2013-02-09 2:03 UTC (permalink / raw)
To: notmuch
david@tethera.net writes:
> These are the remaining unapplied patches from
>
> id:1358619958-21209-1-git-send-email-david@tethera.net
>
> They are rebased to omit the actual command line argument, as suggested by
>
> id:87d2wzwmd9.fsf@servo.finestructure.net
pushed.
d
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] man: document NOTMUCH_DEBUG_QUERY
2013-01-29 20:47 ` Jameson Graef Rollins
2013-01-29 21:01 ` David Bremner
@ 2013-04-15 14:26 ` david
2013-04-30 9:19 ` David Bremner
1 sibling, 1 reply; 9+ messages in thread
From: david @ 2013-04-15 14:26 UTC (permalink / raw)
To: notmuch; +Cc: David Bremner
From: David Bremner <bremner@unb.ca>
This is is really functionality of the library, but CLI users might
not look at library docs even if they existed beyond notmuch.h
---
man/man1/notmuch.1 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/man/man1/notmuch.1 b/man/man1/notmuch.1
index 923fefe..033cc10 100644
--- a/man/man1/notmuch.1
+++ b/man/man1/notmuch.1
@@ -164,6 +164,11 @@ Location to write a talloc memory usage report. See
in \fBtalloc\fR(3)
for more information.
+.TP
+.B NOTMUCH_DEBUG_QUERY
+If set to a non-empty value, the notmuch library will print (to stderr) Xapian
+queries it constructs.
+
.SH SEE ALSO
\fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] man: document NOTMUCH_DEBUG_QUERY
2013-04-15 14:26 ` [PATCH] man: document NOTMUCH_DEBUG_QUERY david
@ 2013-04-30 9:19 ` David Bremner
0 siblings, 0 replies; 9+ messages in thread
From: David Bremner @ 2013-04-30 9:19 UTC (permalink / raw)
To: notmuch
david@tethera.net writes:
> From: David Bremner <bremner@unb.ca>
>
> This is is really functionality of the library, but CLI users might
> not look at library docs even if they existed beyond notmuch.h
Pushed,
d
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-04-30 9:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-29 12:13 minor fixes for talloc leak logging david
2013-01-29 12:13 ` [PATCH 1/2] man: document NOTMUCH_TALLOC_REPORT environment variable david
2013-01-29 20:47 ` Jameson Graef Rollins
2013-01-29 21:01 ` David Bremner
2013-04-15 14:26 ` [PATCH] man: document NOTMUCH_DEBUG_QUERY david
2013-04-30 9:19 ` David Bremner
2013-01-29 12:13 ` [PATCH 2/2] CLI: add simple error handling for talloc logging david
2013-01-29 12:21 ` minor fixes for talloc leak logging Tomi Ollila
2013-02-09 2:03 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).