Code Monkey home page Code Monkey logo

java-concurrency-profiler's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sattishv

java-concurrency-profiler's Issues

Thread state changes over time

The pie chart illustrating the current thread state distribution can be improved by adding the dimension time. Implement this visualization by using another diagram from JFreeChart.

Invocation context of wait and notify

Logging when and by which thread notifyAll() and wait() is invoked is not sufficient. Profile also the information in which methods notifyAll() and wait() were invoked.

Prepare Code For The Santa Claus Problem

For first results in the bachelor thesis, prepare the code for The Santa Claus Problem. This includes adjusting the solution to use notifyAll() and compare it with other available solutions.

Use case: merge sort

Use the concurrent merge sort implementation to explore a possible problem sketch and its solution by using the profiler. If required extend the functionality of the profiler in order to find a solution. A possible problem sketch is to measure where most of the time is spent in the merge sort implementation.

Refine two use cases

Refine the use case "The Santa Claus Problem" and "Producer Consumer" in order to get more interesting results on the profiling.

Thread unique identifier

The Java Programming Language provides for a Thread instance the method getId(). However this ID is not accessibly from fields provided by the JVMTI agent. Therefore a unique identifier is needed in order to distinguish different threads from each other. The JVMTI provides an object tag mechanism. Tag every thread with an incrementing number.

Code documentation

Provide a basic code documentation for the C++ code and provide JavaDoc for the Java code.

notifyAll inconsistency

Using printf-debugging in Java notifyAll is called less than the profiler displays. This might be due to implementation reasons of the JVM within the operating system and system calls. Investigate this inconsistency and state it in the bachelor thesis.

Refactor to MVC

Refactor the whole Java code base so far to implement a clean use of the MVC pattern.

Synchronized statements

Implement the profiling of the synchronized statement in Java. The implementation includes a new tab in the graphical user interface which displays the logged events concerning actions on the monitors.

Attach API

Implement the use of the Java Attach API in order to start profiling already launched JVMs.

Use case: producer-consumer problem

Use the Java implementation of the producer-consumer problem to explore a possible problem sketch and its solution by using the profiler. If required extend the functionality of the profiler in order to find a solution.

Timestamp inconsistency

Comparing the transmitted timestamps and their events with each other, there seems to be an inconsistency. Investigate what the reason is.

Wait-for graph construction

Implement the construction of a wait-for graph to the profiler. Consider to replace the log on monitor enter and monitor leaving by this graph.

Display Event Type

While iterating over the profiled events it would improve the understanding of what is happening, if the type of the event is displayed. Implement this feature in a meaningful way.

Refactor inter-process communication

Refactor the inter-process communication between the profiler agent and the profiler GUI. Instead of using XML for serialization use protobuf.

Use case: Read Write Locks

Use the Java ReadWriteLock synchronization construct to explore a possible problem sketch and its solution by using the profiler. If required extend the functionality of the profiler in order to find a solution.

notify wait flowchart

The presentation of the logged notify-wait data can be improved by using a flowchart graph. Implement this flowchart graph.

Fix Monitor Data Collection

Currently every monitor events triggers agent messages which include a monitor lock, respectively its identification and statistics about it. When entering a synchronized block this is valid. However these data should not be send when wait(), notify() or notifyAll() is called upon a monitor lock, because this leads to too much monitor locks in the end.

Since wait(), notify() and notifyAll() calls are usable to get the class type of the monitor lock, an intermediate solution should be found in order to get meaningful data.

Message Reordering

Due to the nature of profiling, it is possible, Agent Messages are received in the wrong order. This applies only to a little number of messages. To reduce the fault tolerance anyway, implement a message reordering.

Motivation

The section 1.4 "Threads are everywhere" in Java Concurrency In Practice offer a good set of arguments, why dealing with threads is important. Use this argumentation to start writing the motivation section in the bachelor thesis.

Profiling Of Multiple Java Virtual Machines

A feature which is missing for a long time, is the profiling of multiple JVMs. Since the tool is in the process of a total refactoring, use this to implement the possibility of profiling multiple JVMs. The different JVMs should by selectable through a new tabbed panel which encapsulates the different views.

Refactor Message Processing

The message processing in the Java front-end is not flexible. Refactor the message processing in a way it is encapsulated in a wrapper class allowing to execute and undo the message.

Timestamps

Add timetamps to the messages generated by the profiling agent.

Building process

Provide a building process which can be adapted as easy as possible without using the Eclipse CDT development environment. Provide a short manual how to build and use the profiler.

Launch Java programs

Find a solution to start Java programs from the Profiler GUI which also initiates the profiling at the start.

Use case: the Santa Claus problem

Use the Java implementation of the Santa Claus problem to explore a possible problem sketch and its solution by using the profiler. If required extend the functionality of the profiler in order to find a solution.

notify wait statistics

Add simple statistics about invocations of notify wait, for instance count the method invocations per thread.

Thread statistic

Add some sort of collecting thread data which provides a thread statistic for every thread. The thread statistic is visualized in Java using a graphical design.

Thread CPU time

The JVMTI API offers functions to get the time which the CPU spent for a certain thread. Get these information on the termination of a thread and display it in the overview tab.

Refactor Message Dispatching

At the moment, generated Agent Messages are sent by invoking the send function on the active socket. Instead the generated Agent Messages should only be inserted into the queue of messages which pend for being transmitted.

Logging concept

Displaying the current events will not be sufficient to get an insight on the profiled program behavior. Investigate a potential solution for logging all the events generated by the profiling agent, for instance using snapshots at certain hooks or using a complete event history.

Lock information

The JVMTI API function GetObjectMonitorUsage offers information about an object's monitor. Pack these information into the MonitorEvent and model it in Java as a class describing a lock object. Display these information in Java on the Lock tab in a textual representation.

notify/wait profiling

In #7 the idea was taken up for a conceptional visualization of the Java methods notify() and wait() and their side effects. Implement it in a simple way without further visualization but textual representation.

Agent class design

Check if it useful to put the profiling agent into its own C++ class. Further create a class in C++ which encapsulates the auxiliary functions used by the profiler agent.

Measuring Method Execution

Methods can be measured in different means: time taken, CPU clock cycles, number of invocations or relative wall time compared to every other method. Implement this feature and display the results in a table.

Use case idea

Create the first draft of a possible target use case for the profiler, for instance a simple program using the producer-consumer pattern which lacks balanced number of producer or consumer thread with respect to the CPU utilization.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.