Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6094571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:41:41+00:00 2026-05-23T12:41:41+00:00

I would like to be able to visualize the call sequence for a given

  • 0

I would like to be able to visualize the call sequence for a given JVM process (what methods were called on which objects and what parameters where passed). For example a tool that would dump this information to a file.
Is there an existing tool to do this? If not could you give some pointers on how this can be done? What solutions could you advise (besides modifying the bytecodes of the methods)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:41:42+00:00Added an answer on May 23, 2026 at 12:41 pm

    OP says, “Java logging” no good. “Yes but you have to insert manually all the log calls. Not a very viable option for a large project, is it?”.

    OK, what you need is a way to insert custom instrumentation automatically into your application.

    Our DMS Software Reengineering Toolkit with its Java Front End could be used to do this. DMS provides generic machinery to parse source code, build ASTs and symbol tables, analyze the code (trees) for special cases, and carry out transformations on the code(trees), finally regenerating modified code (from the modified trees). The Java Front end enables DMS to do this for Java; DMS has many other front end language modules.

    What you’d want to do is to write a DMS source-to-source transformation to instrument the function entry with logic to dump the parameter list values (e.g., serialize their “toString” equivalents):

    tag RecordArguments(a:arguments):statements;
    
    instrument_function_entry rule(r:type,m:identifier,a:arguments,s:stmts):method->method
       "\r \m(\a) { \s } "
       ->
       "\r \m(\a) { Call.FunctionEntry(\stringify\(\m\));\RecordArguments\(\a\); { \s } }"
    
    empty_arguments rule () arguments -> statements
       "\RecordArguments\(\) " -> ";"
    
     more_arguments rule (args:arguments,a:argument) arguments -> statements
       "\RecordArguments\(\args,\a)" 
       -> "\RecordArguments\(\args\);Call.Argument(\a.toString()))"
    

    What the “instrument_function_entry” rule does is place a call to record the function entry, and to generate a series of calls to record the argument values. The “empty_arguments” rule handles the base case of no-more-arguments to process (including “no arguments at all”). The “more_arguments” rule handle a list of arguments by picking off the last, generating code to dump that argument, and producing a shorter list of remaining argumetns to be processed by the same rule or eventually the “empty_arguments” rule.

    What this should produce for the method:

     int  X3(char J, array[] X)
     { <code> }
    

    will be

     int X3(char J, array[] X)
     {  Call.FunctionEntry("X3");
        Call.Argument(J.toString());
        Call.Argument(X.toString());
        { <code> } 
      }
    

    You get to define the “Call” object however you like, to record the results. If you want to place extra filters in there to eliminate data from the wrong thread, or not between some time window or not near some interesting event, you can. This is likely to slow down you application a lot, at least if you let the instrumenter do this to every function call across your application. (More complex transformations can control where they are applied).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to be able to loop through all of the defined parameters
Would like to be able to set colors of headings and such, different font
We would like to be able to nightly make a copy/backup/snapshot of a production
I would like to be able to use the Tab key within a text
I would like to be able to display some dynamic text at the mouse
I would like to be able to obtain all the parameter values from the
I would like to be able to define and use a custom type in
I would like to be able to predict what will be in the resulting
I would like to be able to do such things as var m1 =
I would like to be able to embed a command line interpreter inside a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.