Re: Method entry/exit

From: [email protected]
Date: Tue, 4 Mar 1997 17:53:15 -0500 (EST)
To: [email protected]
Subject: Method entry/exit
Reply-to: [email protected]
Hi all: I am trying to find out the best way to trace method entry and exit
information for debugging. I am trying the debugger but I have not found how
to capture and print this info.
Any ideas?
Thanks...
We wrote a Diagnosis utility class way back in the early beta days to
handle this need. It's one way to go.
-- Len
==============================================
Len Leber
ATG Solutions, Incorporated
[email protected]

Ed (and others that may be using these trace flags),
This "Profiler" tracing is available in Forte Release 2.x via these
trace flags, and will be available in a furture Forte Release through
the UI. In Forte R2, there is a start-up bug with using these trace
flags with either FORTE_LOGGER_SETUP or the -fl command line flag,
so you must set them after you start your Forte process with
Modify Log Flags...
At 04:33 PM 3/6/97 +1200, you wrote:
>
You can use the trc:in:51:1 trace flag to trace method entry/exit by task.
trc:in:53:1 traces methods by the entire application. trc:in:52:1 gives a
call-tree tracing by task, and trc:54:1 gives a call-tree trace by
application.This is nice in theory, but my NT client bombs out when I start it up
with these flags. Is anyone else experiencing weirdness here? No error
messages, just the Stack Backtrace.
- Ed
================================================================================
Eduard E Havelaar, Information Services Section, University of Canterbury
internet: [email protected]
phone: +64-3-366 7001 extn 8910
fax: +64-3-364 2999
snailmail: Private Bag 4800, Christchurch, New Zealand
== Brian T. Murrell Phone: 510.869.2130 ==
== Technical Support MailTo:[email protected] ==
== Forte Software, Inc. http://www.forte.com ==

Similar Messages

  • Instance filtering of method entry/exit events in JDI

    I've been trying to use the instance filters added to JDI in Java 1.4 without success. JPDA appears to ignore my attempts to add instance filters to MethodEntryRequests and MethodExitRequests. It produces MethodEntryEvents or MethodExitEvents for every method entry or exit that passes the other filters on the event.
    I create method exit requests and add instance filters as follows (method entry requests are similar) (obj is an ObjectReference):
         MethodExitRequest mer=erm.createMethodExitRequest();
         mer.addInstanceFilter(obj);
         mer.setSuspendPolicy(EventRequest.SUSPEND_NONE);
         mer.enable();For example, when I create method exit events in this way for a few Strings in the debuggee and then run length() on one of them (in the debuggee), I receive one MethodExitEvent for each String instead of one single event corresponding to the request with the right object in the instance filter.
    As I can't find any working example code for instance filters in method entry/exit requests, I can't tell whether I'm doing something wrong or there is a bug in JPDA. Has anyone else had any luck with instance filters?

    Before anyone asks, I'd better mention that I get the same problems on Java 1.4.1_02-b06 on SuSE Linux and Solaris 8, Java 1.4.0-1 on Tru64 UNIX and 1.4.1_01-b01 on Debian Linux. I don't think this is an installation-specific or machine-specific problem.

  • Get method return value

    Hi. We're using bytecode instrumentation in a native jvmti agent to monitor method entry/exit. I'd like to capture method return values and report them upon method exit. I see how to obtain local variables, and am indeed doing this when a method is entered; however, I'm not sure how to get a method's return value.
    Thanks for any advice.
    -- david

    You will need to do two things to make this work:
    1) Change the method that your return instrumentation calls to accept a parameter (the return value).
    2) Modify your bytecode instrumentation to call your new function with the return value.

  • RE: log trace on Service Object

    I haven't tried myself; but got a copy from someone of part of technote
    10398 which says (the minimum you need is:)
    trc:in:1 Prints out information about interpreter state object.
    10 - Print method entry/exit
    trc:in:2 Trace the interpretation of method invocations and exception
    handling
    2 - Prints entry/exit and exceptions
    trc:in:51:1 Traces method entry/exit by task
    trc:in:54:1 Traces method entry/exit by application
    Try it.
    -----Original Message-----
    From: Eric Abécassis [mailto:[email protected]]
    Sent: Tuesday, April 13, 1999 10:24 AM
    To: Forte User List
    Subject: log trace on Service Object
    Hi Everybody,
    I would like to set log trace on each call (method entry and exit) on a
    Service Object, but I didn't find any log flag which helps me.
    Does someone have any ideas on how to do that ?
    Thank you for your help !
    Eric Ab&eacute;cassis <[email protected]>
    Senior Architect
    Sema Group DTS
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi Eric,
    You can find on http://perso.club-internet.fr/dnguyen/ a little tool called CodeAdd which adds Entry and Return trace. I fact, you
    can use it to add any kind of code at the beginning and the end of your methods.
    It also allows you to add a pre-formated comments header in you code.
    In a further version, It may be possible to replace a code sequence from your methods. For instance, you may add a trace class and
    change a task.Part.LogMgr.Putline by a call to your own class, or need to suppress some lines.
    Just be carefull to use the tool on a local backupo of your repository : CodeAdd updates your methods directly in the repository.
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    Url : http://perso.club-internet.fr/dnguyen/
    Eric =?iso-8859-1?Q?Ab=E9cassis?= a &eacute;crit:
    Hi Everybody,
    I would like to set log trace on each call (method entry and exit) on a
    Service Object, but I didn't find any log flag which helps me.
    Does someone have any ideas on how to do that ?
    Thank you for your help !
    Eric Ab&eacute;cassis <[email protected]>
    Senior Architect
    Sema Group DTS
    Eric Ab&eacute;cassis <[email protected]>
    Senior Architect
    Sema Group DTS
    Eric Ab&eacute;cassis
    Senior Architect <[email protected]>
    Sema Group DTS Courrier HTML
    les Algorithmes - Pythagore A route des Lucioles, BP 279;Sophia Antipolis;;06905;France T&eacute;l. cellulaire: +33 (0) 6 62 36 68 83
    T&eacute;l&eacute;copie: +33 (0) 4 93 95 xx xx
    Bureau: +33 (0) 4 93 95 46 50
    Informations suppl&eacute;mentaires:
    le nom ABECASSIS
    Pr&eacute;nom Eric
    Version 2.1-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Help needed with multiple and seperate image galleries on 1 site

    I'm looking for a simple way to create and manage multiple image galleries (about 100) on a single website. I work for an architect and have a site which has our project portfolio and every project has a page containing a write up with a gallery of only 6 images.  Currently I am using .css to run it. If you hover over one of the 6 thumbnails it opens up a larger image in the same div container. If you move the cursor off the thumbnail the main image goes away leaving a default background. The only problem is my bosses now want each image to be retained in view until you hover over the next thumbnail.
    Any ideas anyone?

    I've never see a performance issue with IsSameObject(), although I understand your issue, it seems to be pretty fast.
    Saving a global reference to a jclass prevents it from being GC'd, I don't think it prevents it from being unloaded.
    I'm not sure I understand your comment about jmethodID's being different for the same method. Technically, the jmethodID is unique for each class image loaded and class loader. So if a class is unloaded and reloaded, or the same class managed to get loaded by two different class loaders, then you might see multiple jmethodID values. But do you know that is happening?
    I have seen some race conditions on the JVMTI event callbacks around Method Entry/Exit and Thread Start/End. If you don't use some rawmonitors to protect yourself, you could be executing your callback code for the methodExit event while the thread goes away out from under you. I don't know if that could be an issue, but it caused me to scratch my head quite a bit when I ran into it.

  • GetLineNumberTable start_location

    I have an agent that performs class disassembly of bytecodes in memory similar to how javap does for .class files. However when I print line_numbers and start_location via GetLineNumberTable, the start_location differs from the javap output. There seems to be an offset of 5. Below is the output from my agent and from javap:
    agent:
    public static void main(java.lang.String[]);
    LineNumberTable:
    line 8: 0
    line 9: 15
    line 10: 19
    javap:
    public static void main(java.lang.String[]);
    LineNumberTable:
    line 8: 0
    line 9: 10
    line 10: 14
    The start_location (except for the first line - start_loc = 0) is always off by 5 for all classes/methods.
    Any idea why this is?
    Thanx
    JJ

    I think I figured this out. My agent also does some BCI for method entry/exit via the ClassFileLoadHook. This would account for the difference of the start_location in the .class file vs.the instrumented class at runtime.

  • The Day the JVM Died.....

    Ok. Im at a dead end.
    Im running an app on HP and find that every now and then it becomes completely unresponsive - including kill -3's (thread dump) being igored.
    CPU is low (0.5%).
    The app is a web app sat on tomcat (4.1.29).
    I thought initially it might be a deadlock problem - so I ran it with JDB enabled - with the aim of checing out the threads when it got stuffed.
    Nope. Couldn't repeat the problem when running with the debug options.
    So, I instrumented all the jars (both tomcats and ours) with method entry / exit tracing with BCEL.
    Again the problem could't be recreated with simple tracing (straight to file).
    So, I smartened it up a bit and had the tracing keep a thread local history of the last X calls. I added a simple poller that instructed the trace to dump when a token file was no longer present.
    The plan being I could delete the file after a lock up and get the last X calls for each thread dumped and see WTF was going on.
    Sure enough, with this lightweight mechanism I could recreate the problem. However, as gut feeling told me, the trace files didn't get dumped after the lock up (the fact that a kill -3 was being ignored should of told me that!).
    So now Im a bit lost as to where to go next.
    Cant use kill -3 thread dumps, cant use remote debugging to get a thread dump, cant use tracing.
    Has anyone had a similar experience or know of any next steps that could be of use?
    Dave

    <targeted target="lyricalGangstar">
    word up, it be none other than that dirty dog LyricalGangstar shar-mon?
    For sho', I is thinkin nuff dollar be rinsed out me wallet to get to tha roots of this bad bwoy.
    </targeted>
    Also looks like there may be a needed OS patch. HP had problems with their pthreads library by the looks of it - and more to the point - in a way which JVMs could effect JVMs.
    http://www.hp.com/products1/unix/java/patches/g-11.11-1.4-1111.0312.html
    (Patch 29960).
    We're sat on patch 29109 at the moment - so Im gonna upgrade and see where that gets me.

  • Derive method of characteristic relationship with exit class BI IP

    Hi All,
    We have below four fileds in real time planning cube.
    Quantity
    Unit of measure
    Converted Quantity
    Converted UOM
    We have implemented characteristic relationship of type exit between UOM and converted UOM. We need to populate values of converted UOM using characteristic relationship.
    do we need to implement derive method to fulfil this requirement ?
    if yes, when derive method of exit class is getting called ?
    Awaiting for your reply.
    Regards,
    Mitesh.

    Hi Andrey,
    Thanks for your reply.
    I have tried approach suggested by you however break-point did not stop yet to derive method.
    I will give little more details on what i have implemented, probably it may help you.
    I implemented CREATE method and generated below combinations. No other method has been implemented yet.
    UOM            Converted UOM
    G                 KG
    KG              G
    clear ls_unit.
      ls_unit-unit = 'G'.
      ls_unit-unit1 = 'KG'.
      APPEND ls_unit to lt_unit.
      clear ls_unit.
      ls_unit-unit = 'KG'.
      ls_unit-unit1 = 'G'.
      APPEND ls_unit to lt_unit.
    E_TH_CHAS = lt_unit[] .
    Kindly suggest,
    1. any specific configuration at query level is required to call derive method
    2. what code should i need to write if i want to derive above combination using derive method
    Thanks,
    Mitesh.

  • How to pass value from EXIT to method

    Hi friends
    1)  My requirement is that when the person change the amount field in TRIP t-code i need to send a mail to the manager. So i found a exit FIT0002 here when ever the traveler change the amount i am setting the flag as x when he change and y when no amount is changed in exit. I did export to memory id and in my method i did import from memory id. But this is not performing gud. If at a time many users apply the trip and changes the advance the flag is not getting set. I checked in the log. No flag is set its empty no x nor y. After clearing the buffer SWU_OBUF. Again all the users applied the trip then the flag is set and every manager got the mail. But why this is happening?. Is there any other way to achieve it. I want to get the flag value to my method. Is there any other work around.
    2)  I tried with SAP_WAPI_WRITE_CONTAINER directly getting the value and writing to the workflow container its not correct way since i need to write commit work. But the exit itself does commit.
    3) I tried with SET/GET parameter but i don't no how to divert my flow from my method to exit when i use SET/GET parameters.
    Can any one throw some light on this issue.
    Regards
    vijay

    If you are able to get the workitem ID then try to use the below code snippet and check because even Iam setting some value back to the workitem container
    DATA :
          w_wiid      TYPE             sww_wiid     VALUE   'XXXX',
          w_ref       TYPE REF TO      if_swf_run_wim_internal,
          w_ref_cnt   TYPE REF TO      if_wapi_workitem_context,
          w_wi_ref    TYPE REF TO      if_swf_ifs_parameter_container,
          ls_agent    TYPE             swr_wihdr.
    TRY.
        CALL METHOD cl_swf_run_wim_factory=>find_by_wiid
          EXPORTING
            im_wiid     = w_wiid
          RECEIVING
            re_instance = w_ref.
      CATCH cx_swf_run_wim_enq_failed .
      CATCH cx_swf_run_wim_read_failed .
      CATCH cx_swf_run_wim .
    ENDTRY.
    CALL METHOD w_ref->get_workitem_context
      RECEIVING
        re_ctx = w_ref_cnt.
    CALL METHOD w_ref_cnt->get_wi_container
      RECEIVING
        re_container = w_wi_ref.
    TRY.
        CALL METHOD w_wi_ref->set             " Setting the Value Back to WORKITEM CONTAINER
          EXPORTING
            name       = lc_result
            value      = lv_value       
          IMPORTING
            returncode = lv_return.
      CATCH cx_swf_cnt_cont_access_denied .
      CATCH cx_swf_cnt_elem_access_denied .
      CATCH cx_swf_cnt_elem_not_found .
      CATCH cx_swf_cnt_elem_type_conflict .
      CATCH cx_swf_cnt_unit_type_conflict .
      CATCH cx_swf_cnt_elem_def_invalid .
      CATCH cx_swf_cnt_container .
    ENDTRY.

  • Exiting from method in enhancement

    Hi Experts,
    I am enhancing a standard class method thought an exit point at the beginning of the method. When a certain condition is satisfied in the enhancement point I want to stop the processing further and exit the complete method.
    EXIT will not work here as its only for a processing block. Any suggestions?
    Thanks

    AFAIK this is not allowed, else you could successfully replace the full SAP code by inserting in a pre-method or any start Implicit enhancement points any customer code and then exiting the form/method/module, that would not be an enhancement but a full modification of the standard SAP code and should require [SSCR key|http://service.sap.com/sscr ].
    (For the same reason someone already posted a thread where he put an IF and ELSE in a first Enhancement and the ENDIF if another, good try, but SAP editor/enhancement builder didn't get fooled
    You could only raise an error or error message to leave the processing block  behind the enhancement (FORM, FM, Method)
    Regards,
    Raymond

  • Verifier and method transactions

    Test Name : tests.ejb.ContainerTransactionStyle3
         Test Assertion : The container transaction method must be one defined in the remote or home interface of the specified enterprise bean test
         Test Description : For [ module_forum_jar#forum_jar#Sequence ]
    Error: Container Transaction method name [ remove ] not defined in [ Home ] or [ Component ] interface.
    Tre transaction is defined in the ejb-jar.xml for this method... but remove it is not on the home interfaces as the spec say.
    Why this error???

    I have not seen this problem. METHOD_ENTRY and EXIT events are posted from the same java thread which entered method
    and exited method. So you should see ENTRY first and EXIT next. If you have java program which shows this behavior post
    it here.

  • JDI losing events on VM exit

    Hello all,
    I have been writing a simple debugger application using the JDI architecture where i start the debugger, the debugger listens for a remore VM to attach, then the debugger monitors the remote VM until the remote VM exits.
    I have been tracing method entries, but the JDI seems to lose events when the remote VM ends program execution. If I put Thread.sleep(500) or something similar as the last statement in the remote VM app that is being debugged, it gives me all the method entry events. If not, it seems to drop a random number of the method events and just gives me the VMDIsconnectedEvent or whatever it was called.
    I guess this might be because the JDI implementation does not keep itself alive to fire off all the method events? Or maybe it is not this, I am just guessing.
    Any ideas how to avoid losing event? I could maybe add a shutdownhook with a thread.sleep, but that would require modifying the debugged app and I find that unacceptable..
    thanks for any help,

    I didn't face similar problems when worked with JDI, could you show that part of your application which listens events?

  • Running a java application without a main method

    class MainMethodNot
        static
            System.out.println("This java program have run without the run method");
            System.exit(0);
    }The reason this works is that static initialization blocks get executed as soon as the class is loaded, even before the main method is called. During run time JVM will search for the main method after exiting from this block. If it does not find the main method, it throws an exception. To avoid the exception System.exit(0); statement is used which terminates the program at the end of the static block itself.
    got it from http://www.java-tips.org/

    This has been published many times on this forum. What is your question?

  • Need user exit lists and corresponding Program name for Transaction F110

    Hi all,
    I have a requirement to update trading partner field based on payment method using Exits or BADI during payment posting (which is carried out in F110). Please give me the exact user exit/program for this requirement.
    Thanks in advance
    Moderator message: please do more research before asking, show what you have done yourself when asking.
    Edited by: Thomas Zloch on Jun 22, 2011 9:19 AM

    Hi all,
    I have a requirement to update trading partner field based on payment method using Exits or BADI during payment posting (which is carried out in F110). Please give me the exact user exit/program for this requirement.
    Thanks in advance
    Moderator message: please do more research before asking, show what you have done yourself when asking.
    Edited by: Thomas Zloch on Jun 22, 2011 9:19 AM

  • Problem with Default method of BUS2034 after Redefinition

    Hi All,
    We had a requirement for which I REDEFINED the default method of BUS2034 in the inherited object.
    The Decission workitem in which this object was attached, was being opened from UWL using WINGUI.
    Now, after the redefinition, the defult method is not opening up the attachement to show the contract document.
    P.S: I have reverted all code changes in that.
    Please help. Its critical.
    Thanks & Regards,
    Deb

    What do you mean by redefimed. You maintained ahew entry in the Default method entry in SWO1?
    I will recommend you to create a subtype and not delegate it to standard Bo and use this in your workflow with a new method as the default method.
    Thanks
    Arghadip

Maybe you are looking for