Giter Site home page Giter Site logo

eper's People

Contributors

argv0 avatar dizzyd avatar dszoboszlay avatar essen avatar esstrifork avatar getong avatar haguenau avatar hanssv avatar hyperthunk avatar legoscia avatar macintux avatar massemanet avatar mbbx6spp avatar mxtthias avatar nox avatar robertoaloi avatar slfritchie avatar systra avatar ten0s 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eper's Issues

Improve documentation

I am pretty new at Erlang. It would be great if you could add some documentation to sherk, gperf and redbug. I could do it you point me to some sources or anything I can read.

Thanks!

Erlang/OTP 27, +0.0 will no longer be exactly equal to -0.0

Hi @massemanet
Would you be able to fix the new strict [float checking](Erlang/OTP 27, +0.0 will no longer be exactly equal to -0.0)?

Eper can't compile anymore with Erlang 26.1 as you can see:

===> Compiling src/dtopConsumer.erl failed
src/dtopConsumer.erl:121:7: matching on the float 0.0 will no longer also match -0.0 in OTP 27. If you specifically intend to match 0.0 alone, write +0.0 instead.

The fix is very simple IMHO:

    case lks(beam_user,Sys,1)+lks(beam_kernel,Sys,0) of
      +0.0 -> 1;
      C -> C
    end,

Many thanks

Opening About window with non-default ticktime takes long time

I'm starting sherk this way:

$ erl -pa gtknode/lib/erlang/lib/gtknode-0.32/ebin -pa eper/lib/erlang/lib/eper-0.60/ebin -sname sherk -setcookie NETSim/var/tmp/ethanl/AAA -kernel net_ticktime 300 -kernel net_setuptime 100
Erlang R14B03 (erts-5.8.4) [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]
[...]Eshell V5.8.4 (abort with ^G)
(sherk@eselivm2v47lmwp)1> sherk:go().
<0.49.0>
(sherk@eselivm2v47lmwp)2>
=INFO REPORT==== 5-Sep-2011::12:18:21 ===
in: {gtknode,handle_portdata,2}
portdata: "I am gtknode_sherk, you are sherk@eselivm2v47lmwp (14)\n"

=PROGRESS REPORT==== 5-Sep-2011::12:18:22 ===
supervisor: {local,inet_gethost_native_sup}
started: [{pid,<0.59.0>},{mfa,{inet_gethost_native,init,[[]]}}]

=PROGRESS REPORT==== 5-Sep-2011::12:18:22 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.58.0>},
{name,inet_gethost_native_sup},
{mfargs,{inet_gethost_native,start_link,[]}},
{restart_type,temporary},
{shutdown,1000},
{child_type,worker}]

Opening windows from the sherk GUI takes a long time, in the order of minutes (actually I thought windows can't be opened at all, it took so long time to appear). If I use the default net_ticktime and net_setuptime values, the GUI is fast. Unfortunately I have to use the non-default values, because this is what the application uses. Do you have any ideas why it's slow?

I'm using SuSE 10 SP2 on x86 and got both gtknode and sherk from the github repository on Friday (2011-09-02).

Idea and some more questions: only print last message

When a function calls fails, I typically use redbug to trace a function higher in the call stack to see why it was called and how.

In this cases, often, only the last call is relevant. Since redbug anyway uses a buffer, maybe, redbug could hold the printing for a second or so, and then print.

Other questions:

  • conf file, or should I just edit redbug.erl for my own defaults?
  • I can only trace 1 place, when I try to add a 2nd pattern, it says already started, any workaround?

Fix code causing dialyzer warnings

Plt is build with command

dialyzer --build_plt --apps erts kernel stdlib mnesia ssl inets crypto asn1 public_key tools syntax_tools eunit os_mon runtime_tools compiler

Output:

dialyzer deps/eper/ebin 
  Checking whether the PLT /home/maxvel/.dialyzer_plt is up-to-date... yes
  Compiling some key modules to native code... done in 0m31.11s
  Proceeding with analysis...
logReader.erl:18: Function read/2 has no local return
prfSys.erl:137: The pattern {{'unix', _}, _} can never match the type {'unix',atom()} | {'win32',atom()}
prfSys.erl:210: Function init_ps/0 will never be called
watchdog.erl:577: The variable _ can never match since previous clauses completely covered the type 'false'
watchdog.erl:581: The variable _ can never match since previous clauses completely covered the type 'false'
watchdog.erl:592: The variable _ can never match since previous clauses completely covered the type 'false'
watchdog.erl:596: The variable _ can never match since previous clauses completely covered the type 'false'
watchdog.erl:603: The pattern 'false' can never match the type {'nomatch',binary(),'trivial' | 'trumpet',binary() | string()}
watchdog.erl:612: The pattern 'false' can never match the type {'nomatch',binary(),'trivial' | 'trumpet',binary() | string()}
watchdog.erl:618: The variable _ can never match since previous clauses completely covered the type 'false'
watchdog.erl:624: The variable _ can never match since previous clauses completely covered the type 'false'
watchdog.erl:631: The variable _ can never match since previous clauses completely covered the type 'false'
watchdog.erl:638: The variable _ can never match since previous clauses completely covered the type 'false'
watchdog.erl:645: The variable _ can never match since previous clauses completely covered the type 'false'
watchdog.erl:652: The variable _ can never match since previous clauses completely covered the type 'false'
watchdog.erl:656: The variable _ can never match since previous clauses completely covered the type 'false'
watchdog.erl:713: Guard test is_list(L::'trivial' | 'trumpet') can never succeed
Unknown functions:
  gtknode:cmd/2
  gtknode:start/1
 done in 0m3.62s
done (warnings were emitted)

Add count results feature.

It would be really nice to be able to know how many messages process received/sended in given amout of time, how many times function was called with particular arguments.
Syntax could be like redbug:start("mod:critical_fun(X) when is_binary(X) -> count", [{time, 10000}]).

error in io_lib:format/2

When I do this:

19> redbug:start("erlang:now/0 -> return;stack").
ok
20> now().

it gives me:

=ERROR REPORT==== 30-May-2012::15:12:09 ===
Error in process <0.78.0> with exit value: {badarg,[{io_lib,format,["ns <~p> ~P",[["15:12:09",{erlang,apply,2},{erlang,now,[]},999999]]],[{file,"io_lib.erl"},{line,133}]},{redbug,flat,2,[{file,"src/redbug.erl"},{line,322}]},{redbug,'-mk_out/1-fun-0-',4,[{file,"src/redbug.erl"},{line...

{1338,383529,17789}

Am I using R15B01 (erts-5.9.1), am I doing something wrong here?

Erlang 21 compat

When I try to compile eper with erlang 21 I just get

 % ./rebar3 compile
===> Verifying dependencies...
===> Compiling eper
===> Compiling src/redbug.erl failed

which is not exactly a helpful error message :P.

I fiddled a little bit around, removed the stacktrace statements and some other stuff which might be incompatible with erlang 21. Also I removed the ?log macros which look like a dark art anyway, but all this did not change anything. Any idea what's going on here?

redbug does not work in eunit

A simple eunit test case causes an error in redbug

rb_test() ->
    {_, _} = redbug:start("lists:sort->stack", [{print_file, "redbug.txt"}]),
    timer:sleep(2000),
    ?assertEqual([1,2,3], lists:sort([3,2,1])),
    redbug:stop().
=ERROR REPORT==== 4-Feb-2014::15:04:28 ===
Error in process <0.69.0> with exit value: {terminated,[{io,format,[<0.67.0>,"~s~n",["\n15:04:28 <0.65.0>({erlang,apply,2}) {lists,sort,[[3,2,1]]}"]],[]},{redbug,'-mk_outer/1-fun-2-',5,[{file,"redbug.erl"},{line,343}]},{redbug,'-wrap_print_fun/1-fun-0-',3,[{file,"redbug.erl"},{line... 

I works good if eunit is not used.
I would love to see redbug working in eunit tests.

Autotools build broken?

Last commit removed file README which is required by automake. The following change fixes it:

diff --git a/configure.ac b/configure.ac
index ad3ca39..4d16afb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@ AC_COPYRIGHT(Copyright (C) 2008-2013 Mats Cronqvist)
 dnl AC_REVISION($Id$)

 dnl Require automake version >=1.9.5.
-AM_INIT_AUTOMAKE(1.9.5)
+AM_INIT_AUTOMAKE([foreign], 1.9.5)

 dnl Erlang-related configuration.
 AC_ERLANG_SUBST_ROOT_DIR

However that's not all. Running make after that results in beam files created in src/, no .app file and so on.

Does anyone actually use the autotools build? Shouldn't it just be removed? I can do that if that's OK.

How to specify binary to match in start spec?

I'm trying to debug cowboy requests, and watch particular header values, but what i get is

> redbug:start("cowboy_req:header(<<\"origin\">>, _) -> return").
{bad_type,{bin,[{bin_element,1,
                             {string,1,"origin"},
                             default,default}]}}

> redbug:start("cowboy_req:header(<<\\\"origin\\\">>, _) -> return").
{{badmatch,{more,{erl_scan_continuation,[],no_col,
                                        [{'\\',1},
                                         {'<<',1},
                                         {'(',1},
                                         {atom,1,header},
                                         {':',1},
                                         {atom,1,cowboy_req}],
                                        1,
                                        {erl_scan,#Fun<erl_scan.3.23802282>,false,false,false},
                                        {" . )_ ,>>\"nigiro"," . )_ ,>>\"\\nigiro",1,no_col},
                                        #Fun<erl_scan.29.23802282>}}},
 {parse_body,"cowboy_req:header(<<\\\"origin\\\">>, _) -> return"},
 [{redbug_msc,'-body_fun/1-fun-0-',1,
              [{file,"src/redbug_msc.erl"},{line,168}]},
  {redbug_msc,assert,2,
              [{file,"src/redbug_msc.erl"},{line,237}]},
  {redbug_msc,parse,1,
              [{file,"src/redbug_msc.erl"},{line,142}]},
  {redbug_msc,transform,1,
              [{file,"src/redbug_msc.erl"},{line,18}]},
  {redbug,chk_trc,2,[{file,"src/redbug.erl"},{line,518}]},
  {lists,foldl,3,[{file,"lists.erl"},{line,1261}]},
  {redbug,pack,1,[{file,"src/redbug.erl"},{line,469}]},
  {redbug,do_start,1,[{file,"src/redbug.erl"},{line,317}]}]}

I found no examples with binaries or strings in documentation. so how can I make spec with them?

See more than 6 processes

I would like to see more than just the 6 top processes when running etop.
So I tracked down where this can be set in the code.

I could get more data by changing one value.

I changed prfPprc.erl line 28 form

-record(cst,{items=6

to

-record(cst,{items=19

This works and now I can see 19 top erlang processes, not just 6.
But I would like to know if there are any valid important motivations
for limiting the list to 6? Have i missed something important ?

Doesn't compile on R16B02

rebar.config has warnings_as_errors enabled so the deprecations stop this from compiling.

src/prf_crypto.erl:28: crypto:des_cbc_encrypt/3 is deprecated and will be removed in in a future release; use crypto:block_encrypt/4
src/prf_crypto.erl:35: crypto:des_cbc_decrypt/3 is deprecated and will be removed in in a future release; use crypto:block_decrypt/4
src/prf_crypto.erl:38: crypto:md5/1 is deprecated and will be removed in in a future release; use crypto:hash/2

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.