From kato-spec-return-305-apmail-incubator-kato-spec-archive=incubator.apache.org@incubator.apache.org Thu Dec 17 11:05:21 2009 Return-Path: Delivered-To: apmail-incubator-kato-spec-archive@minotaur.apache.org Received: (qmail 20140 invoked from network); 17 Dec 2009 11:05:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Dec 2009 11:05:21 -0000 Received: (qmail 73037 invoked by uid 500); 17 Dec 2009 11:05:21 -0000 Delivered-To: apmail-incubator-kato-spec-archive@incubator.apache.org Received: (qmail 72997 invoked by uid 500); 17 Dec 2009 11:05:21 -0000 Mailing-List: contact kato-spec-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: kato-spec@incubator.apache.org Delivered-To: mailing list kato-spec@incubator.apache.org Received: (qmail 72986 invoked by uid 99); 17 Dec 2009 11:05:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 11:05:20 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andrew_johnson@uk.ibm.com designates 194.196.100.167 as permitted sender) Received: from [194.196.100.167] (HELO mtagate7.uk.ibm.com) (194.196.100.167) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 11:05:09 +0000 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate7.uk.ibm.com (8.13.1/8.13.1) with ESMTP id nBHB4jAA004713 for ; Thu, 17 Dec 2009 11:04:48 GMT Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nBHB4igN1519734 for ; Thu, 17 Dec 2009 11:04:44 GMT Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nBHB4iWi003059 for ; Thu, 17 Dec 2009 04:04:44 -0700 Received: from d06ml069.portsmouth.uk.ibm.com (d06ml069.portsmouth.uk.ibm.com [9.149.38.218]) by d06av05.portsmouth.uk.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nBHB4ikf003049 for ; Thu, 17 Dec 2009 04:04:44 -0700 In-Reply-To: References: <4B1FF1CA.8060908@stoo.me.uk> X-Disclaimed: 13614 To: kato-spec@incubator.apache.org MIME-Version: 1.0 Subject: Re: Andrew Johnson's comments X-KeepSent: 0C27BEC2:47B9298B-80257689:0035A662; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.0.2FP1 SHF149 July 17, 2009 From: Andrew Johnson Message-ID: Date: Thu, 17 Dec 2009 11:07:50 +0000 X-MIMETrack: Serialize by Router on D06ML069/06/M/IBM(Release 8.0.2FP2|June 22, 2009) at 17/12/2009 11:07:51, Serialize complete at 17/12/2009 11:07:51 Content-Type: text/plain; charset="US-ASCII" X-Virus-Checked: Checked by ClamAV on apache.org Steve Poole wrote on 10/12/2009 23:04:43: > > (3). > > > > Which methods returning lists throw exceptions? > > > > Why is this relevent? This was just for consistency in the API - having some methods throwing exceptions rather than returning empty lists or lists with corrupt data is confusing. There should be good reasons for as deviation from the norm. > > ------- > > > > (4). > > > > Predictable order via different VMs? > > > > What does this mean ? > If you have a list of items then this implies an order. If you have the same implementation of Kato, but process the dump using two different VMs to run Kato, should the results come out in the same order? Should the results come out in the same order from two different runs? HashSets and HashMaps have unpredictable orders, especially with two different VMs. If dump processing was multi-threaded then an implementation could happen to generate results in a different order. Using an index into a list then becomes less useful. > > Page 25 > > ======= > > (7). > > > > re. `services directory' > > . This text file should contain a single line which is the package > > qualified name of the ImageFactory.... > > ^^^^^^ > > > > Multiple factories? > > How would multiple factories work in one jar? > > > > For each factory you add a new line in the service file. We can make that > more clear. > > > > (11). > > > > public Image getImage(File file) > > > > Throws > > IllegalArgumentException if file is null > > > > Why not throw NPE? > > > > Don't like NPEs - they can happen unexpectedly. Throwing a IAE makes it > deliberate. Thats what its for, There are huge arguments on this one! http://stackoverflow.com/questions/3881/illegalargumentexception-or-nullpointerexception-for-a-null-parameter Consistency in the API is also important. Do we check for null everywhere? Is getImage(nullArg) more common than other errors? > (12). > > > > List sniff file type! > > > > get suggested factories for a file or files: > > > > / getFactories(File file) > > \ getFactories(File file, File file) > > > > I think that's too specific - if 2 files why not 3 or 4... If its a list > of files what happens if multiple factories can handle one or more of the > files? > > > > > > (15). > > > > Table 6.5. Class Summary > > > > DataUnavailable should be DataUnavailableException > > > > > > DU extends DUE? This was more a style issue - normally exceptions have "Exception" in their name, and errors have "Error" in their name. FindBugs thinks it is bad style not to. DataUnavailable sounds more like the corresponding Interface to CorruptData for bad things from lists. > > > > Page 29 > > ======= > > > > Table 6.7. ImageMethods > > > > getAddressSpaces() > > > > Also segmented arch? > > > > Can you explain some more - I can't guess what you mean. > I'm not sure how we should represent dumps from segmented architectures. Even Windows sometimes does this - having FS or GS mapping to some thread specific storage, so FS:[0] is always points to the exception handler chain for that thread. What's more confusing is that the FS value is the same for each thread, but as part of a thread switch the mapping of the FS register is changed. I think the way to solve this is to have an ImageRegister.getPointer() method. You could then do ImageRegister FS; FS.getPointer().getIntAt(8); For an ordinary register then getPointer() returns the value of the register treated as an address in the process address space. For more complex cases such as FS:0 then this could help. Fortunately in Windows then FS has a base address in the same address space as everything else in the process, so FS.getPointer() returns a pointer in the standard address space, but each thread's FS would return a different address in the address space even though getValue returned the same Number. Also see ESA/370 access registers: http://researchweb.watson.ibm.com/journal/rd/464/plambeck.pdf ESA/370 The ESA/370 architecture retained the address size and other attributes of 370-XA, added 16 new 32-bit access registers, and extended the address-space control to two bits to support two additional translation modes: homespace mode and access-register mode. In the home-space mode, instruction and operand addresses are translated using the home STD in CR13. This was originally used by the ESA/370 control program (MVS*) and now is used also for Linux** application programs. In the access-register (AR) mode, instructions are in the primary address space, and operands are in AR-specified address spaces. The instruction field specifying a base GR for address generation for a storage operand also selects the samenumbered access register. The access register is loadable by the application program and contains an access-listentry token (ALET) that designates, by means of an access-list-entry number (ALEN) an entry in an access list. The access-list entry in turn points to an ASTE which contains an STD that is used by DAT to translate the virtual address for the storage-operand access. Special ALET values are defined as designating the current primary STD and current secondary STD. This architecture allows a program to associate a different address space with each base register used for storageoperand accesses. The mapping of ALETs to STDs, known as access-register translation, is depicted in Figure 4. This mapping allows for precise control of access to shared address spaces by various programs as well as simultaneous and efficient access to multiple address spaces by a single program. For this system: ImageRegister R1; R1.getPointer().getIntAt(8); the Kato implementation would know that R1 was associated with the address space in AR1 and return an appropriate pointer in another address space. Should we have: ImageRegister.getPointer(long offset) or perhaps?? ImageRegister.getPointer(Number n) ImageRegister R1, R2; R1.getPointer(R2.getValue().intValue()).getIntAt(8); Is that worth the convenience over this? R1.getPointer().add(R2.getValue().intValue()).getIntAt(8); > > > Page 30 > > ======= > > > > getProcessorCount() > > > > Returns the number of CPUs running in the system on which the image was > > running. > > > > System = partition? > > > > (I guess Andrew is suggesting "System" should be described as a "partition" > > in a virtual machine, z/Arch LPAR, pSeries LPAR, etc.?) > > > > > > I don't want too much big iron terminology here. The end user is mostly > going to be intel or equivilent based. Partition is something on a disk to > them. (Or maybe I'm just getting old) > Any public proof of the best common terminology to use would be welcome. > I guess the system is what the operating system is running on, rather than the hypervisor's view. Andrew Johnson (personal view) Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU