From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
Cc: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
"linux-rdma
(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] opensm: Add per module logging support
Date: Wed, 30 May 2012 19:12:38 -0400 [thread overview]
Message-ID: <4FC6A966.4000009@dev.mellanox.co.il> (raw)
In-Reply-To: <20120530160342.96708ead.weiny2-i2BcT+NCU+M@public.gmane.org>
On 5/30/2012 7:03 PM, Ira Weiny wrote:
> On Wed, 30 May 2012 17:30:50 -0400
> Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org> wrote:
>
>>
>> Add _v2 APIs for osm_log, osm_log_is_active, and osm_log_msg_box
>> Also, add these to libopensm.map
>> Add _V2 forms of the various OSM_LOG macros
>>
>> All of above pass additional parameter to identify module.
>> Each module defines a unique FILE_ID from 0-254.
>> 255 is reserved to indicate "name not found".
>> FILE_ID must match index in osm_subnet.c:module_name_str
>> table. Note also currently that subnet's
>> per_mod_log_tbl is 128 entries (which is enough
>> more than the number of modules).
>
> This is a great idea for debugging but do you really need to define the "FILE_ID's"? Could you use the __FILE__ macro to do a lookup? Or do you think that would affect performance?
That was the first implementation and the performance impact was too much.
> Also do you really think that 255 files is enough id's to reserve?
Yes but it's hard to predict the future. We're only at 88 now. We've
only added a few per year and this leaves >160 more.
-- Hal
> Ira
>
>>
>> Use version 2 API (osm_log_v2) and macros (OSM_LOG_V2_xxxx)
>> in OpenSM client code
>>
>> Added options to enable/disable per module logging and
>> it's configuration file
>>
>> Config file format
>> Set of lines with module name and logging level as follows:
>> <module name><separator><logging level>
>> where:
>> module name is file name including .c
>> separator is either = , space, or tab
>> logging level is the same levels as used in the coarse/overall logging
>> as follows:
>>
>> BIT LOG LEVEL ENABLED
>> ---- -----------------
>> 0x01 - ERROR (error messages)
>> 0x02 - INFO (basic messages, low volume)
>> 0x04 - VERBOSE (interesting stuff, moderate volume)
>> 0x08 - DEBUG (diagnostic, high volume)
>> 0x10 - FUNCS (function entry/exit, very high volume)
>> 0x20 - FRAMES (dumps all SMP and GMP frames)
>> 0x40 - ROUTING (dump FDB routing information)
>> 0x80 - currently unused
>>
>> Add parsing of the configuration file into table of log levels
>> indexed by FILE_ID
>>
>> Added osm_get_log_per_module routine to obtain the configured info
>> for a supplied module name. This is a new library function.
>>
>> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>> ---
>> As this patch is too large for email, please find this @
>> https://www.openfabrics.org/~halr/0001-opensm-Add-per-module-logging-support.patch
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-05-30 23:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 21:30 [PATCH] opensm: Add per module logging support Hal Rosenstock
[not found] ` <4FC6918A.9080503-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2012-05-30 23:03 ` Ira Weiny
[not found] ` <20120530160342.96708ead.weiny2-i2BcT+NCU+M@public.gmane.org>
2012-05-30 23:12 ` Hal Rosenstock [this message]
2012-06-05 0:28 ` Jim Foraker
[not found] ` <1338856118.17237.927.camel-mxTxeWJot8FliZ7u+bvwcg@public.gmane.org>
2012-06-05 17:53 ` Hal Rosenstock
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=4FC6A966.4000009@dev.mellanox.co.il \
--to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=weiny2-i2BcT+NCU+M@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.