From: Breno Leitao <leitao@linux.vnet.ibm.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: systemtap@sources.redhat.com
Subject: Re: [PATCH] Create a function that indents without the tid()
Date: Wed, 30 Sep 2009 19:57:00 -0000 [thread overview]
Message-ID: <4AC3B809.9040503@linux.vnet.ibm.com> (raw)
In-Reply-To: <y0m4oqkjlcf.fsf@fche.csb>
Hi Frank.
Frank Ch. Eigler wrote:
>> So, I decided to create a simpler function that doesn't
>> consider the thread.
>
>> +function indent(delta){
>> + _indent += delta
>> + for (i=1; i<_indent; i++) r .= " "
>> + return r
>> +}
>
> Perhaps, but why not just
>
> function indent(delta) { return _generic_indent(0, delta) }
Well, it makes sense, and it was my first implementation, but later I found that
tid() can be 0, and then the space counter (_indent_counters[idx]) will be
corrupted when running indent() and thread_indent() together.
So, that is why in my example I put the example that contains the first line as:
0 swapper(0): -> neo_copy_data_from_queue_to_uart
So, we can assume the risk and implement as you proposed, assuming that no one will
use both function together.
Thanks for you review.
next prev parent reply other threads:[~2009-09-30 19:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 18:11 Breno Leitao
2009-09-30 19:15 ` Frank Ch. Eigler
2009-09-30 19:57 ` Breno Leitao [this message]
2009-09-30 20:25 ` Frank Ch. Eigler
2009-09-30 20:55 ` Breno Leitao
2009-09-30 21:00 ` Frank Ch. Eigler
2009-10-01 1:26 ` Breno Leitao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AC3B809.9040503@linux.vnet.ibm.com \
--to=leitao@linux.vnet.ibm.com \
--cc=fche@redhat.com \
--cc=systemtap@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).