[mdb-discuss] Formatted output.

2009-10-26 Thread Jonathan Adams
On Sun, Oct 25, 2009 at 11:14:43AM -0700, Ray Van Dolson wrote: > On Sun, Oct 25, 2009 at 09:56:34AM -0700, Ray Van Dolson wrote: > > Thanks Jonathan. This is for the most part working now. Just trying > > to figure out the quirks of mdb_printf so the output all stays on one > > line now when my

[mdb-discuss] Formatted output.

2009-10-25 Thread Jonathan Adams
On Sat, Oct 24, 2009 at 09:09:38PM -0700, Ray Van Dolson wrote: > On Sat, Oct 24, 2009 at 01:43:48PM -0700, Jonathan Adams wrote: > > > My next thought is to generate a bunch of calls to mdb -k from the > > > shell and format everything together using awk, perl, or python.

[mdb-discuss] Formatted output.

2009-10-24 Thread Jonathan Adams
On Sat, Oct 24, 2009 at 12:24:14PM -0700, Ray Van Dolson wrote: > I'm wanting to generate output similar to the 'lslk' command (found on > Linux for example, and in Solaris too once upon a time I believe) using > mdb. > > ::lminfo is great, but it truncates the path name at the end. > > I know yo

[mdb-discuss] ::whatis ARC case

2009-09-15 Thread Jonathan Adams
On Tue, Sep 15, 2009 at 04:18:14PM -0400, James Carlson wrote: > Jonathan Adams wrote: > > I've written up the following ARC case for my ::whatis rewrite, and wanted > > to see if there were any comments before I submit it for PSARC review. > > > > What do you al

[mdb-discuss] ::whatis ARC case

2009-09-15 Thread Jonathan Adams
Hi all, I've written up the following ARC case for my ::whatis rewrite, and wanted to see if there were any comments before I submit it for PSARC review. What do you all think? Thanks, - jonathan -- next part -- Introduction/Background --- A workhor

[mdb-discuss] debug help "0xdeadbeefdead00ef" , buffer modified after being freed

2009-09-15 Thread Jonathan Adams
On Tue, Sep 15, 2009 at 05:50:24AM -0700, Valdemar Moreira Pavesi wrote: > > ::umem_status > Status: ready and active > Concurrency:8 > Logs: transaction=128k (inactive) > Message buffer: > umem allocator: buffer modified after being freed > modification occurred at offset 0x4

[mdb-discuss] ::findleaks issue?

2009-09-10 Thread Jonathan Adams
On Wed, Sep 09, 2009 at 12:35:33PM +0800, Colin Yi wrote: > From the above results, We know for the first leak the buffer address > is 0xff01d710ad18 > > > *cpqary3_state::walk softstate|::print -at cpqary3_t drvr_replyq > ff01d51948a0 cpqary3_drvr_replyq_t *drvr_replyq = 0xff01d7f11e

[mdb-discuss] Doors debugging help

2009-09-03 Thread Jonathan Adams
On Thu, Sep 03, 2009 at 04:29:21PM -0700, Dan Mick wrote: > Steve Gonczi wrote: > >Hello, > > > >I am debuggin a doors problem. My question is: how should I interpret the > >door_pc field in the door_node? As per the Mauro/McDougall book it > > contains the address of the function that services

[mdb-discuss] New ::whatis design

2009-09-03 Thread Jonathan Adams
Hi all, My ::whatis putback from last week: 6875845 ::whatis should be able to dump the bufctl/vmem seg got me thinking about revisiting some long-standing issues with ::whatis: 1. addr::kgrep | ::whatis can take a huge amount of time, since each line of ::whatis output walks

[mdb-discuss] Heads-up: new MDB ::print, the end of (forward declaration)

2009-09-01 Thread Jonathan Adams
On Tue, Sep 01, 2009 at 10:42:03AM -0700, Steve Gonczi wrote: > Hi Jonathan, > > I think I have found a work-around: > > ::print spa_t and similar *_t types indeed often result in a forward decl > error, > but substituting the (often predictable) struct definition almost always > works. > >

[mdb-discuss] Heads-Up: ::whatis changes

2009-08-27 Thread Jonathan Adams
Hi all, My recent putback of: 6875845 ::whatis should be able to dump the bufctl/vmem seg Changes the default behavior of ::whatis in the following ways: 1. By default, we will now automatically invoke "::bufctl -v" (or "::vmem_seg -v") for kmem/vmem buffers with debuggin

[mdb-discuss] Setting Frame and printing the function argument

2009-06-22 Thread Jonathan Adams
On Mon, Jun 22, 2009 at 09:59:25AM +0530, oviaprasad.dharuman at wipro.com wrote: > Hi All, > > I am new to this group. I frequently use gdb to debug my core > files. Can you please any one tell me how to move to particular frame in > the stack and how to print the value of argument that wa

[mdb-discuss] flag for post-mortem/in situ target

2009-06-19 Thread Jonathan Adams
On Fri, Jun 19, 2009 at 02:48:15PM -0700, Mike Shapiro wrote: > On Fri, Jun 19, 2009 at 02:45:43PM -0700, Jonathan Adams wrote: > > On Fri, Jun 19, 2009 at 01:08:01PM -0300, Rafael Vanoni wrote: > > > I'm making some small changes to mdb_modapi.c and I'd like to kno

[mdb-discuss] flag for post-mortem/in situ target

2009-06-19 Thread Jonathan Adams
On Fri, Jun 19, 2009 at 01:08:01PM -0300, Rafael Vanoni wrote: > I'm making some small changes to mdb_modapi.c and I'd like to know if > there's a way to check whether the running instance is debugging a core > file or a live target. Looking through the target flags, I didn't see > anything like

[mdb-discuss] [perf-discuss] Memory Statistics

2009-06-15 Thread Jonathan Adams
On Mon, Jun 15, 2009 at 10:28:31AM -0700, Jonathan Adams wrote: > On Thu, Jun 11, 2009 at 01:52:54AM -0500, rickey c weisner wrote: > > I have a unnamed linked list data structure that looks like: > > > > { > > void * next; > > char data[80]; > > } >

[mdb-discuss] [perf-discuss] Memory Statistics

2009-06-15 Thread Jonathan Adams
On Thu, Jun 11, 2009 at 01:52:54AM -0500, rickey c weisner wrote: > I have a unnamed linked list data structure that looks like: > > { > void * next; > char data[80]; > } > > I want to walk the list of pointers. > > ::list should be able to do the walk if I had a type. addr::list $[0] should d

[mdb-discuss] libumem does not load

2009-05-08 Thread Jonathan Adams
On Fri, May 08, 2009 at 03:35:02AM -0700, Renil Thomas wrote: > Hi Experts, > > A program with ownership bin:bin, I use : > > LD_PRELOAD=/usr/lib/libumem.so UMEM_DEBUG=audit ./"program" > then use "gcore" to generate the core dump. > > While using : #mdb core.x > > the libumem.so is not gettin

[mdb-discuss] Heads-up: new MDB ::print, the end of (forward declaration)

2009-05-05 Thread Jonathan Adams
On Tue, May 05, 2009 at 02:44:01PM -0700, Steve Gonczi wrote: > Awesome, thank you. > > What do I need to do to get this putback? Anything which has snv_114 or later has this putback. Cheers, - jonathan

[mdb-discuss] Heads-up: new MDB ::print, the end of (forward declaration)

2009-04-23 Thread Jonathan Adams
Hi all, With my recent putback of: 4916519 can't ::print forward-decl typedef 5006620 ::print's enum printing should support power-of-two-flags enums 6824044 mdb ::print output could be more regular The long-reviled: > ::print spa_t (forward declaration) > has been fix

[mdb-discuss] ::print output question

2009-03-27 Thread Jonathan Adams
Currently, ::print does not print anything about the top-level structure or union that is being printed. I'm in there working on something else: 4916519 can't ::print forward-decl typedef and I noticed that the code in elt_print() would be much simpler if we treated the top level the sam

[mdb-discuss] RFE idea: ::dcmds

2009-03-10 Thread Jonathan Adams
On Tue, Mar 10, 2009 at 05:21:27PM -0700, Dan Mick wrote: > I'm constantly forgetting what dcmds are available (and walkers). What say > you to an extension of ::dcmds and/or ::walkers to take a > regular-expression string for matching the dcmd or walker name and > description, and show only th

[mdb-discuss] MDB Module API revision

2009-03-09 Thread Jonathan Adams
On Sun, Mar 08, 2009 at 05:37:32PM -0700, Jonathan Adams wrote: > Hi everyone, > > I've been working on a wad started by Eric Schrock a couple years ago to > add type information to MDB pipelines. It has blossomed into a fairly big > modification of the MDB module API, and

[mdb-discuss] [tools-discuss] MDB Module API revision

2009-03-09 Thread Jonathan Adams
On Mon, Mar 09, 2009 at 12:05:37PM -0400, James Carlson wrote: > Perhaps what's needed is a new summary for ::print -- the command line > in the documentation (though oddly not the ::help text) says this: > > [address] ::print [-aCdiLptx] [-c lim] [-l lim] [type [member|offset ... ]] > > ... but

[mdb-discuss] [tools-discuss] MDB Module API revision

2009-03-09 Thread Jonathan Adams
On Mon, Mar 09, 2009 at 08:56:43PM +0100, max at bruningsystems.com wrote: > Hi Jonathon, > > Jonathan Adams wrote: > >On Mon, Mar 09, 2009 at 09:08:51AM +0100, max at bruningsystems.com wrote: > > > >> > >>>::walk kmem -n kmem_alloc_8192 > >>

[mdb-discuss] [tools-discuss] MDB Module API revision

2009-03-09 Thread Jonathan Adams
On Mon, Mar 09, 2009 at 03:00:23PM -0700, Dan Price wrote: > On Mon 09 Mar 2009 at 02:35PM, Jonathan Adams wrote: > > I've gone back and forth on this, and those were the other options I saw. > > Maybe doing an incompatible change is the right answer: > > >

[mdb-discuss] [tools-discuss] MDB Module API revision

2009-03-09 Thread Jonathan Adams
On Mon, Mar 09, 2009 at 02:43:27PM -0700, Peter Memishian wrote: > > > > I've gone through the materials, and I have one question about the new > > > behavior for ::print: how does it disambiguate the command line? > > > > > > For example, if I do this: > > > > > > > ::walk foo | ::print

[mdb-discuss] [tools-discuss] MDB Module API revision

2009-03-09 Thread Jonathan Adams
On Mon, Mar 09, 2009 at 01:26:41PM -0700, Dan Price wrote: > On Mon 09 Mar 2009 at 12:21PM, Jonathan Adams wrote: > > The main effect of the currently proposed kmem walker is to unify the > > 6 kmem walkers: "kmem", "bufctl", "free", "freectl&quo

[mdb-discuss] [tools-discuss] MDB Module API revision

2009-03-09 Thread Jonathan Adams
On Mon, Mar 09, 2009 at 12:05:37PM -0400, James Carlson wrote: > I've gone through the materials, and I have one question about the new > behavior for ::print: how does it disambiguate the command line? > > For example, if I do this: > > > ::walk foo | ::print bar > > is "bar" a member of

[mdb-discuss] [tools-discuss] MDB Module API revision

2009-03-09 Thread Jonathan Adams
On Mon, Mar 09, 2009 at 09:08:51AM +0100, max at bruningsystems.com wrote: > Hi Jonathon, > > Jonathan Adams wrote: > >On Sun, Mar 08, 2009 at 05:37:32PM -0700, Jonathan Adams wrote: > > > >>Hi everyone, > >> > >>I've been working on a wad

[mdb-discuss] MDB Module API revision

2009-03-08 Thread Jonathan Adams
On Sun, Mar 08, 2009 at 05:37:32PM -0700, Jonathan Adams wrote: > Hi everyone, > > I've been working on a wad started by Eric Schrock a couple years ago to > add type information to MDB pipelines. It has blossomed into a fairly big > modification of the MDB module API, and

[mdb-discuss] MDB Module API revision

2009-03-08 Thread Jonathan Adams
Hi everyone, I've been working on a wad started by Eric Schrock a couple years ago to add type information to MDB pipelines. It has blossomed into a fairly big modification of the MDB module API, and I'd like to get some community review before I put this back. Here's the introduction from the p

[mdb-discuss] [ogb-discuss] noticed MDB grants expiring

2009-03-06 Thread Jonathan Adams
On Fri, Mar 06, 2009 at 01:15:30PM -0800, Michelle Olson wrote: > I have added the MDB core contributor renewals for ahl, eschrock, > johnlev, simmonmt, and mws to the polling database. I also +1ed it. Cheers, - jonathan > Regards, > Michelle > > On 03/05/09 12:35, Michelle Olson wrote: > >On

[mdb-discuss] noticed MDB grants expiring

2009-03-04 Thread Jonathan Adams
On Wed, Mar 04, 2009 at 11:38:19AM -0800, Mike Shapiro wrote: > On Wed, Mar 04, 2009 at 10:40:52AM -0800, Michelle Olson wrote: > > hi all, > > > > I noticed that the remaining core contributor grants for the MDB > > community expired last week. I checked with John Levon and because he > > thoug

[mdb-discuss] mdb module access to current instruction?

2009-03-03 Thread Jonathan Adams
On Tue, Mar 03, 2009 at 12:29:46PM -0800, Andrew Paprocki wrote: > Yeah, I'll just have to live with the stderr output for now. I think > the approach of mdb_eval()/mdb_get_dot() might be pretty slow compared > with being able to mdb_readvar() directly. Yeah, but compared to stopping and starting

[mdb-discuss] mdb module access to current instruction?

2009-03-03 Thread Jonathan Adams
On Tue, Mar 03, 2009 at 10:34:14AM -0800, Andrew Paprocki wrote: > > No; you don't want =K, since that will print it to > > standard output. Just > > do "<%s", then mdb_eval(), then mdb_get_dot() > > Max/Jonathan, thanks for your help! I have a module up and running which > continually grabs S

[mdb-discuss] mdb module access to current instruction?

2009-03-03 Thread Jonathan Adams
On Tue, Mar 03, 2009 at 08:52:51AM +0100, max at bruningsystems.com wrote: > Hi Andrew, > > Andrew Paprocki wrote: > >>Why not use watchpoints (::wp)? > >>max > >> > > > >Watchpoints assume you know the address you want to watch. I want to > >dynamically print out any 'common' variable that a

[mdb-discuss] mdb module access to current instruction?

2009-03-03 Thread Jonathan Adams
On Mon, Mar 02, 2009 at 12:40:02PM -0800, Andrew Paprocki wrote: > Is it possible to write a mdb module which has programmatic access to > the current instruction at %pc? > > I'd like to write an mdb module which ::step's a process and > looks at each instruction to determine if it is reading/writi

[mdb-discuss] stack overflow within mdb itself

2009-02-26 Thread Jonathan Adams
On Thu, Feb 26, 2009 at 03:11:04PM -0500, James Carlson wrote: > Alexandre Chartre writes: > > > > That's a runtime problem so the compiler can not do anything (unless you > > allocate an obviously too large structure on the stack), but this will > > mainly depend on the code path and allocation

[mdb-discuss] stack overflow within mdb itself

2009-02-26 Thread Jonathan Adams
On Thu, Feb 26, 2009 at 09:07:00PM +0100, max at bruningsystems.com wrote: > Jonathan Adams wrote: > >On Thu, Feb 26, 2009 at 11:42:59AM -0800, Edward Pilatowicz wrote: > > > >>On Thu, Feb 26, 2009 at 01:42:24PM -0500, James Carlson wrote: > >> > >>&

[mdb-discuss] stack overflow within mdb itself

2009-02-26 Thread Jonathan Adams
On Thu, Feb 26, 2009 at 11:42:59AM -0800, Edward Pilatowicz wrote: > On Thu, Feb 26, 2009 at 01:42:24PM -0500, James Carlson wrote: > > I just spent a little over a day debugging a stack overflow problem in > > mdb itself. It turned out to be a fairly simple problem -- I'd added > > a new dcmd, an

[mdb-discuss] mdb dmod - compile with gcc on x86 ?

2009-02-20 Thread Jonathan Adams
On Fri, Feb 20, 2009 at 05:08:46PM -0500, William Reich wrote: > > I built a fresh/up-to-date Sol 10 Update 6 x86 disk. > I installed the Sun Studio 12 compiler. > > I still can not get the mdb dmod file to load. > > > We downloaded and installed this Sun compiler. > > I still get errors..

[mdb-discuss] mdb dmod - compile with gcc on x86 ?

2009-02-19 Thread Jonathan Adams
On Thu, Feb 19, 2009 at 12:08:55PM -0500, Bhaskar Sarkar wrote: > William Reich wrote: > > > >I am trying to compile a dmod for mdb > >using gcc on a 64bit x86 machine. > > > >The compile goes ok, but the resulting file > >does not load into mdb. > > > >Anybody know the solution to this puzzle ? >

[mdb-discuss] ::dump -S

2009-02-12 Thread Jonathan Adams
On Fri, Feb 13, 2009 at 01:29:18AM +, John Levon wrote: > > Dismayingly often, you get dumps like this: > > mdb ~johnlev/core.libvirtd.100848 > Loading modules: [ libc.so.1 ld.so.1 ] > > ::stack > libc.so.1`strcmp+0x90() > > > > I finally got round to adding ::dump support for making grubbi

[mdb-discuss] heads-up: New ::stacks dcmd

2009-02-06 Thread Jonathan Adams
Hi all, FYI, I just sent the following heads-up to onnv regarding a new DCMD in Solaris Nevada: --- cut here --- With my putback of: 6799290 need to uniquify stacks in kmdb There is a new dcmd, ::stacks, in the genunix dmod. If (like me) you find yourself doing: > ::walk thread | ::f

[mdb-discuss] Do we have limit for the buffer used by ::umalog ?

2009-01-29 Thread Jonathan Adams
On Thu, Jan 29, 2009 at 01:38:29PM -0800, Valdemar Moreira Pavesi wrote: > Hello, > > I don't see all allocations ,Do you know if there is a limit for the buffer , > How I can increase. UMEM_LOGGING=transaction=4m (for 4 megabytes; you can make it even larger) Cheers, - jonathan > Thanks! > V

[mdb-discuss] odd ::whatis message

2009-01-27 Thread Jonathan Adams
On Tue, Jan 27, 2009 at 06:23:02PM -0500, Peter Memishian wrote: > > > Stock S10U6: > > > > > 0x6003bc3f428/20X > > 0x6003bc3f428: 0 0 0 > > 0 0 > > 1 0 1 > >

[mdb-discuss] ::memstat shows kernel memory increase but no leaks found

2009-01-04 Thread Jonathan Adams
On Wed, Dec 24, 2008 at 10:25:09AM +0530, Pramod Gunjikar wrote: > I have a test which basically results is a large number of DMA & kmem > resources to be allocated and freed up. After running > the test, I observe that ::memstat shows that the kernel pages has > jumped from around 12% to around

[mdb-discuss] mdb wraps lines at 80 characters when input is

2008-12-08 Thread Jonathan Adams
On Mon, Dec 08, 2008 at 07:44:49AM -0800, Valdemar Moreira Pavesi wrote: > Hello, > > you can use : > > > { echo \$G ; echo ::findleaks -dv ; } | mdb -p $pid -o nostop ^ Please don't do this. '-o nostop' will lead to a very c

[mdb-discuss] lookup function name given the address

2008-10-10 Thread Jonathan Adams
On Fri, Oct 10, 2008 at 03:03:57PM -0400, Girish Moodalbail wrote: > Hello folks, > > I have a quick question on how to obtain the name of the function given > that you have a function pointer to that function? MDB's > *mdb_lookup_by_addr() *doesn't seem to work. mdb_lookup_by_addr() should be

[mdb-discuss] How I can interpret it : couldn't read xxx bytes no mapping for address

2008-09-03 Thread Jonathan Adams
On Wed, Sep 03, 2008 at 01:43:30PM -0700, Valdemar Moreira Pavesi wrote: > Adam,Jonathan > > > ::findleaks -dv > findleaks:maximum buffers => 5538 > findleaks: actual buffers => 5167 > findleaks: > findleaks: potential pointers => 476621388 > findleaks:

[mdb-discuss] How I can interpret it : couldn't read xxx bytes no mapping for address

2008-09-03 Thread Jonathan Adams
ng errors during your libumem investigation, > I hope that Jonathan Adams is paying attention and opts to weigh in. If you send me the output of: % pmap partial_core > output % echo "::umem_debug; ::findleaks -v" | mdb partial_core >> output I can investigate. Cheers, - jonathan

[mdb-discuss] MDB OS versioning

2008-08-18 Thread Jonathan Adams
On Tue, Aug 19, 2008 at 09:56:12AM +1000, James C. McPherson wrote: > Mike Shapiro wrote: > > > >>It seems to me that if we made use of the onnv_XX tags that > >>have been going into the Mercurial clone for a while, then > >>it shouldn't be too hard to regenerate the per-build mdb dmods > >>and us

[mdb-discuss] MDB OS versioning

2008-08-18 Thread Jonathan Adams
On Sat, Aug 16, 2008 at 08:36:43AM -0400, Richard Lowe wrote: > "max at bruningsystems.com" writes: > > > Hi, > > > > John Levon wrote: > >> To my mind, maintaining some level of compatibility is useful in itself. > >> mdb.eng's mdb wrapper notwithstanding, it can still be troublesome. > >> > >>

[mdb-discuss] kmdb: failed to allocate 16320 bytes -- recovering

2008-07-31 Thread Jonathan Adams
On Tue, Jul 29, 2008 at 12:52:42AM -0700, Victor Li wrote: > I got similar thing with ::findleaks, it is on snv_94, i86pc, can anybody > reply? > > bash-3.2# mdb -K > kmdb: target stopped at: > kmdb_enter+0xb: movq %rax,%rdi > [0]> ::findleaks > kmdb: failed to allocate 7712664 bytes -- recover

[mdb-discuss] how to build kmdbmod only

2008-07-16 Thread Jonathan Adams
On Wed, Jul 16, 2008 at 01:05:57PM -0700, Rao Shoaib wrote: > Jonathan Adams wrote: > >On Wed, Jul 16, 2008 at 12:43:40PM -0700, Rao Shoaib wrote: > > > >>I am having trouble building just the kmdbmod. It builds fine when I do > >>a full build but not if I

[mdb-discuss] how to build kmdbmod only

2008-07-16 Thread Jonathan Adams
On Wed, Jul 16, 2008 at 12:43:40PM -0700, Rao Shoaib wrote: > I am having trouble building just the kmdbmod. It builds fine when I do > a full build but not if I just want to change something and build it. > Can someone tell me what is the trick to just build kmdbmod. cd usr/src/cmd/mdb/$ARCH/$I

[mdb-discuss] The MDB show us the 16294 buffers allocated but the HEAP is not growing

2008-07-10 Thread Jonathan Adams
On Thu, Jul 10, 2008 at 02:41:58PM -0700, Valdemar Moreira Pavesi wrote: > I am seeing the allocation 16294 times > > umem_alloc_32 leak: 16294 buffers, 32 bytes each, 521408 bytes total > ADDR BUFADDRTIMESTAMP THREAD > CACHE

[mdb-discuss] ::findleaks , how I can display all 23 buffers's content

2008-07-08 Thread Jonathan Adams
On Tue, Jul 08, 2008 at 09:40:36AM -0700, Valdemar Moreira Pavesi wrote: > Hello gurus, > > umem_alloc_32 leak: 23 buffers, 32 bytes each, 736 bytes total > ADDR BUFADDRTIMESTAMP THREAD > CACHE LASTLOG CONTENTS >

[mdb-discuss] when MDB is active there is a core for /usr/sbin/raidctl every 5 minutes

2008-07-08 Thread Jonathan Adams
On Tue, Jul 08, 2008 at 07:35:14AM -0700, Valdemar Moreira Pavesi wrote: > in reality LIBUMEM active. > > a) active. > > UMEM_DEBUG=default > UMEM_LOGGING=transaction > > > b) inactive > > no UMEM_DEBUG, UMEM_LOGGING set. Please contact your support representative, and have them file a bug ag

[mdb-discuss] A question about compiling mdb modules

2008-06-30 Thread Jonathan Adams
On Mon, Jun 30, 2008 at 10:37:41AM -0700, Mike Shapiro wrote: > On Mon, Jun 30, 2008 at 06:27:17PM +0800, Yu Xiangning wrote: > > Hi mdb gurus, > > > > While compiling the mdb modules with DEBUG mode, we found that -DDEBUG > > is not passed to the compiler. > > > > To fix this, we have to add a l

[mdb-discuss] A question about compiling mdb modules

2008-06-30 Thread Jonathan Adams
On Mon, Jun 30, 2008 at 06:27:17PM +0800, Yu Xiangning wrote: > Hi mdb gurus, > > While compiling the mdb modules with DEBUG mode, we found that -DDEBUG > is not passed to the compiler. > > To fix this, we have to add a line manually to > usr/src/cmd/mdb/Makefile.module: > > $(NOT_RELEASE_BUILD)

[mdb-discuss] how to use realloc in mdb??

2008-06-25 Thread Jonathan Adams
On Tue, Jun 24, 2008 at 12:35:19PM +0530, Saloni Arya wrote: > Hi all, > I am trying to add a dcmd to mdb that lists the zpool history from the > dump. In the code, I want to allocate an array dynamically for which the > size is not known beforehand. I want to use realloc for that. For alloc > a

[mdb-discuss] Why does MDB's view of "ipsa_t" not reflect reality?

2008-06-20 Thread Jonathan Adams
On Fri, Jun 20, 2008 at 02:19:24PM -0400, Dan McDonald wrote: > Consider this innocuous ::print > > > 0x9505c100::print ipsa_t > { > ipsa_next = 0 > ipsa_ptpn = 0x942dca98 > ipsa_linklock = 0x942dcaa0 > ipsa_freefunc = sadb_freeassoc > ipsa_authkeydata =

[mdb-discuss] memstat

2008-05-15 Thread Jonathan Adams
On Wed, May 14, 2008 at 04:15:19PM +0200, konstantin at gremliza.net wrote: > yes there are many ways to extract the information for zfs arc cache size. > > ::memstat is my tool, when it comes to gathering overall memory usage. > my question was: why not include the arc cache size into the ::memst

[mdb-discuss] How to get a mutex info along with a thread info

2007-08-27 Thread Jonathan Adams
On 8/26/07, Brian Xu - Sun Microsystems - Beijing China wrote: > > Oliver Yang ??: > > liujun wrote: > > > >> addr::mutex > >> only give the mutex's info : > >> > >> > >>> 30001054000::mutex > >>> > >>> > >> ADDR TYPE HELD MINSPL OLDSPL WAITERS > >> 030001054000 adapt

[mdb-discuss] how to dump a array and find which slots are non zero?

2007-08-25 Thread Jonathan Adams
On 8/24/07, zhijun wrote: > > > Eric Schrock wrote: > > You have a couple different things in play here. > > First, MDB pipelines only work with uintptr_t's, not arbitrary text. So > when you try to pipe something like "foo: X" or "X Y Z" to another dcmd, > the parser will choke. > > Normally, th

[mdb-discuss] A question about ::vmem debugging by using mdb

2007-08-20 Thread Jonathan Adams
(Oliver and I had an off-list discussion; I got his permission to forward the useful bits back to the list, for the curious and the record. Not everyone knows about ::vmem_seg and its useful options.) On 8/12/07, Oliver Yang wrote: > > Hi All, > > My DR testing failed after about 6000 of DR lo

[mdb-discuss] ::kmastat output different in meaning between x86 32-bit and 64-bit?

2007-08-09 Thread Jonathan Adams
On 8/9/07, Oliver Yang wrote: > > Jonathan Adams wrote: > > [ snipped...] > > > > Looking at the ::kmem_cache output: > > > > 32-bit: > > >::kmem_cache ! grep streams_dblk_1984 > > cac2e2b0 streams_dblk_1984 020f 00 2048 9 > >

[mdb-discuss] ::kmastat output different in meaning between x86 32-bit and 64-bit?

2007-08-03 Thread Jonathan Adams
(oops; I forgot to CC mdb-discuss on this earlier) On 8/2/07, Jonathan Adams wrote: > > > > On 8/2/07, Raymond LI wrote: > > > > Guys, > > > > I met a puzzle when I work with my amd64 box. When I observe a stream > > slab of 2048 sizes, the &q

[mdb-discuss] unable to get transaction history

2007-03-13 Thread Jonathan Adams
On 2/1/07, Rao Shoaib wrote: > I am unable to get the bufctl's transaction history. > > > ::status > debugging crash dump vmcore.1 (64-bit) from punchin > operating system: 5.11 onnv-gate:2007-01-29 (i86pc) > panic message: > BAD TRAP: type=e (#pf Page fault) rp=ff000fdc2140 addr=33a6

[mdb-discuss] Finding leaked addresses using libumem

2007-03-13 Thread Jonathan Adams
On 10/31/06, Brian Utterback wrote: > I already know where the leaked buffer is allocated. I am trying > to track down where it is leaked. If I could see the addresses of the > unleaked buffers, I could tell if every newly allocated buffer is > immediately leaked, or if the five unleaked buffers a

[mdb-discuss] Heads-up: mdb ::print enhancements

2006-08-24 Thread Jonathan Adams
n uninteresting output. It should be available in OpenSolaris and Solaris Express within the next few weeks. (whenever build 48-based versions come out) Enjoy! - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] Re: memory heap check in Solaris 8

2006-08-22 Thread Jonathan Adams
ing for this. I'll be putting the binaries up on the OpenSolaris libumem project page, which will be released today or tomorrow, and when I do so, I will respond here so that you know it has happened. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] assertion failed: total_size == 0, file: ../../common/syscall/sendfile.c, line: 738

2006-08-04 Thread Jonathan Adams
200 860d43d0 svc.startd > R 100190 14 100190 100190 0 0x42004000 8bc243d0 ttymon > R 100185 14 100185 100185 0 0x42014000 8bae43d0 sac > R 100201 100185 100185 100185 0 0x42014000 ffff8bdf43d0 ttymon > > > > root at keith[2:44pm]/var/crash/focal % fmadm faulty -a >STATE RESOURCE / UUID > > -- > > > ___ > mdb-discuss mailing list > mdb-discuss at opensolaris.org -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] libumem oversize - what is the best memory profiler tool on solaris?

2006-08-01 Thread Jonathan Adams
On Tue, Aug 01, 2006 at 02:01:36PM +0100, James Coleman wrote: > Jonathan Adams wrote: > >On Fri, Jul 28, 2006 at 06:24:56PM +0100, James Coleman wrote: > >>Could someone confirm that I am correct about this that oversize > >>allocations are not tracked > >>in

[mdb-discuss] Query regarding .mdbrc

2006-08-01 Thread Jonathan Adams
esn't have the necessary infrastructure to support this, especially on Solaris 8 and 9. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] kmdb and delayed symbol name resolution

2006-08-01 Thread Jonathan Adams
uname -i is > not "standard". (TAD,Viper). So the /platform links aren't set up. > Solaris boots fine this way, but does kmdb need some kind of link > somewhere? If so I'd appreciate any advice. I didn't see anything > obvious /platform for it. No, I don't think that's necessary. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] libumem oversize - what is the best memory profiler tool on solaris?

2006-07-31 Thread Jonathan Adams
he suffix digit for your crash dump file:" > read g > > if [ "$g" = "" ] > then > echo "You did not specify the crash dump file suffix, Aborting!" > exit > fi > > if [ "$n" = "b" ] || [ "$n" = "" ] > then > basic_analysis > outfile.`date |cut -f4 -d" "` > echo "" > echo "Done!" > elif [ "$n" = "a" ] > then > special_cases > echo "" > echo "Done!" > fi > ;; > > 2) > > if [[ "$bin" == "" ]] ; then > echo -n "Enter the binary name which generated the core:" > read bin > fi > > if [[ "$cor" == "" ]] ; then > echo -n "Enter the core file name:" > read cor > fi > > if [ `uname -r | cut -f2 -d"."` -lt 9 ] > then > echo "OS release needs to be Solaris 5.9 to use this option, Aborting !" > exit > fi > > appcore_analysis > ${outfile} > > thr_model=`echo "::status" | mdb $bin $cor | grep thread | cut -f2 -d":"` > if [ "$thr_model" = " multi-threaded" ] > then > mdb $bin $cor <>${outfile} > =nn"Thread stack for MT app" > ="" > ::walk thread | ::findstack > EOA > fi > > if [ $umem ] ; then > mdb_dmods=`mdb $bin $cor < ::dmods > EOA` > mdb_libumem=`echo ${mdb_dmods//*libumem/libumem} |cut -d" " -f 1` > > if [[ ! $mdb_libumem == "" ]] ; then > > echo "::umem_status > ::findleaks > ::umem_verify > ::umastat > ::umausers > \$q > " > libumem-check.mdb > > mdb $bin $cor < libumem-check.mdb >> ${outfile} > > else > echo "WARNING: no libumem info available" >> ${outfile} > echo "WARNING: no libumem info available" > fi > > fi > > echo "Done!output: ${outfile}" > ;; > > 3) > echo "Bye !" > exit;; > > *) > echo "Invalid selection - Aborting !" > ;; > > esac > # End of the script -- 02/21/2002 --grao > > ___ > mdb-discuss mailing list > mdb-discuss at opensolaris.org -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] trace memory corruption

2006-06-29 Thread Jonathan Adams
On Thu, Jun 29, 2006 at 07:57:05PM +0200, Frank Hofmann wrote: > Do we have the userland equivalent of "::kgrep" ? I'm too rarely looking > into application dumps ... Yup; ::ugrep. It's got the same implementation, even. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] trace memory corruption

2006-06-29 Thread Jonathan Adams
ified case where p2 was assigned the same memory address > as p1 there really was no memory corruption. And there's no tool that can detect this case, if the addresses are the same. The best you could do would be to have the allocator delay re-using addresses a bit. Unfortunately, there's no

[mdb-discuss] How to change the default stack depth got by '::findleaks -d'

2006-06-21 Thread Jonathan Adams
se. How can i change > >this depth? > > > >thank you! > > > > > >This message posted from opensolaris.org > >___ > >mdb-discuss mailing list > >mdb-discuss at opensolaris.org > > > > > No good can come from selling your freedom, not for all gold of the world, > for the value of this heavenly gift exceeds that of any fortune on earth. > > ___ > mdb-discuss mailing list > mdb-discuss at opensolaris.org -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] How to change the default stack depth got by '::findleaks -d'

2006-06-21 Thread Jonathan Adams
e second case. How > can i change this depth? UMEM_DEBUG=default,audit=30 would set it to thirty frames. Cheers, - jonahen > > thank you! > > > This message posted from opensolaris.org > ___ > mdb-discuss mailing list &

[mdb-discuss] How to get the umastat like info for a given LWP_ID ?

2006-06-15 Thread Jonathan Adams
:walk allocdby | ::print -d umem_bufctl_audit_t bc_cache->cache_bufsize Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] conditional variable debugging

2006-06-09 Thread Jonathan Adams
erent problem. =] > I assert that from a correctness standpoint, it never matters if you hold > the lock while doing a cv_signal() or cv_broadcast(). I agree that there > may be performance issues, but it would be nice to see some hard data > since (as previously covered) I can see advantages to not holding the lock > as well. True; it seems like a point which can be argued either way. It shouldn't be too hard to collect data with dtrace(1M). Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] conditional variable debugging

2006-06-09 Thread Jonathan Adams
ke it's been there since at least Solaris 7. Probably it's been there from the beginning. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] conditional variable debugging

2006-06-09 Thread Jonathan Adams
On Fri, Jun 09, 2006 at 04:16:08PM -0400, Bill Sommerfeld wrote: > On Fri, 2006-06-09 at 15:52, Jonathan Adams wrote: > > > If I remember correctly, the main problems you can run into with signaling > > after dropping the lock is that there can be destruction races: >

[mdb-discuss] conditional variable debugging

2006-06-09 Thread Jonathan Adams
edictable scheduling behavior is required, then that mutex is locked by thethreadcallingpthread_cond_signal()or pthread_cond_broadcast(). Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] conditional variable debugging

2006-06-08 Thread Jonathan Adams
> that point > time? You might look at dtrace for this; sched:::sleep will fire when a thread sleeps on a condvar, and sched:::wakeup will fire when one thread wakes another. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] how to filter the ouput?

2006-06-06 Thread Jonathan Adams
xd5e1c328 > 0xd5e1c328 > 0xd5e1c328 > 0xd5e1c710 ...dcmds... | ::grep '.' should do the trick. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] Re: Proposal: displaying bitmaps as sets of integers

2006-05-04 Thread Jonathan Adams
ou really want a ::cpuset dcmd, which knows how to print out CPU sets, no matter what the size. Looking in mdb, one already exists: > cpu_ready_set::cpuset 0-1 > cpu_ready_set::cpuset -l 0 1 It's implemented in sun4u/modules/unix/unix.c. So it clearly needs to be genericized for use on x86/amd64. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] A question on piping '::eval' output into '::print'

2006-04-27 Thread Jonathan Adams
On Thu, Apr 27, 2006 at 11:34:44AM +0100, Frank Hofmann - Solaris Sustaining wrote: > Hi experts, > > > I'm wondering why this: > > ::walk ufs_inode_cache | ::print inode_t i_ufsvfs > > does work but the following: > > ::walk ufs_inode_cache | ::eval '=J' | ::print inode_t i_ufsvfs > > gives

[mdb-discuss] ::walk umem_alloc_96 +0x3008/1J| ::bufctl_audit

2006-04-26 Thread Jonathan Adams
and also allows for all kinds of filtering (see '::help bufctl'). You may also want to look at the output of '::umausers', which groups allocations by stack trace. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] How to check the general register's value for a specific CPU

2006-04-12 Thread Jonathan Adams
On Wed, Apr 12, 2006 at 04:43:12PM +0800, Oliver Yang wrote: > Jonathan Adams wrote: > > >On Tue, Apr 11, 2006 at 08:22:15AM +0800, Oliver Yang wrote: > > > > > >>Sorry for raising the question again, maybe my question is not very > >>clear... &

[mdb-discuss] How to check the general register's value for a specific CPU

2006-04-12 Thread Jonathan Adams
On Wed, Apr 12, 2006 at 04:43:12PM +0800, Oliver Yang wrote: > Jonathan Adams wrote: > > >On Tue, Apr 11, 2006 at 08:22:15AM +0800, Oliver Yang wrote: > > > > > >>Sorry for raising the question again, maybe my question is not very > >>clear... &

[mdb-discuss] How to check the general register's value for a specific CPU

2006-04-11 Thread Jonathan Adams
= 0xccbd6d3c > %trapno = 0xe > %err = 0x0 > > > > ___ > mdb-discuss mailing list > mdb-discuss at opensolaris.org > > ___ > mdb-discuss mailing list > mdb-discuss at opensolaris.org -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] How to get the open files info from a core file?

2006-04-04 Thread Jonathan Adams
Unfortunately, that data is not recorded in the core file. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] Why ::findleaks can't find all leaks?

2006-04-02 Thread Jonathan Adams
`umem_cache_alloc+0x13c > libumem.so.1`umem_alloc+0x60 > libumem.so.1`malloc+0x28 > f2+4 > main+0xc > _start+0x108 > > > > > ::findleaks only found 1 leak but actually there are 3 le

[mdb-discuss] "map kernelmap" dcmds in mdb

2006-03-24 Thread Jonathan Adams
most interest. Subtract INUSE from TOTAL for the amount of free VA. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] Re: Obtaining PC of a user process

2006-03-24 Thread Jonathan Adams
hread | ::print kthread_t t_lwp->lwp_regs | > ::print struct regs or > ::pgrep mutt | ::walk thread | ::print kthread_t t_lwp->lwp_regs | ::print > struct regs Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development

[mdb-discuss] mdb for ordinary user(non root)

2006-03-17 Thread Jonathan Adams
n inspect? > > Thanks > Ashok > This message posted from opensolaris.org > ___ > mdb-discuss mailing list > mdb-discuss at opensolaris.org -- Jonathan Adams, Solaris Kernel Development

  1   2   >