Giter VIP home page Giter VIP logo

clrprofiler's Introduction

CLR Profiler

This project has been migrated from CodePlex and isn't actively maintained. It's provided for archival purposes only.

You can find the original wiki home page here.

clrprofiler's People

Contributors

dotnet-bot avatar robertlyson avatar terrajobst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clrprofiler's Issues

Errors when compiling [VS-2019]

They are all of the form.....

Error (active) E0167 argument of type "void (*)(FunctionIDOrClientID functionIDOrClientID)" is incompatible with parameter of type "FunctionTailcall3 *" ProfilerOBJ C:\Users\david.corbin\source\repos\clrprofiler-master\CLRProfiler\profilerOBJ\ProfilerCallback.cpp 1015

How do I add new EH Clause while rewriting the IL

Hi,

I am not sure whether this is the right forum to ask this question, I apologize in advance if it's the wrong place. I am working on the project where I need to instrument some method at runtime. I am stuck here and looking for the solution.

My requirement to instrument a given method, extract input arguments and return value. By any chance, if there is an exception, I need the exception detail as well. I need to call .Net code after fetching the requirement data from the method.

To achieve this, I am using IL Rewrite code base to inject the epilogue and prologue in a method. I have modified the 'ilrewriter' code and getting a callback with input arguments for the prologue and return value for the epilogue in the .Net. So far so good.

Now, I am trying to handle exception scenario. To do so, I am trying to inject try/catch block by adding new EHClause 'ilrewriter' class. In the catch block, I will callback .Net code and then just rethrow. Of course, I am appending the new instructions that are needed for catch block as well for final return. Along with that, I am also updating all the return OpCode with Leave. I am appending below instruction in my method -

// Replace return with following // ... stloc.0 leave.s <int> // ... // Append following block at the end of a method // ... pop ldarg.0 (load 'this') call CallOnException rethrow ldloc.0 ret
Somehow, it's not working as expected. Can anyone please guide me how do I add try/catch that covers entire method?

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.