Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When tracing immediates, print location of definition #2384

Closed
wants to merge 1 commit into from

Conversation

fingolfin
Copy link
Member

@fingolfin fingolfin commented Apr 22, 2018

When tracing immediates, print location of definition

For now, we print the location of the method. Ideally, we should
instead track the location of the InstallImmdiateMethod call. See also
issue #2239.

Before:

gap> TraceImmediateMethods( );
gap> g:= Group( (1,2,3), (1,2) );;
#I  immediate: Size
#I  immediate: IsCyclic
#I  immediate: IsCommutative
#I  immediate: IsTrivial

After:

gap> TraceImmediateMethods( );
gap> g:= Group( (1,2,3), (1,2) );;
#I RunImmediateMethods
#I  immediate: Size at GAPROOT/lib/coll.gi:174
#I  immediate: IsCyclic at GAPROOT/lib/grp.gi:34
#I  immediate: IsCommutative at GAPROOT/lib/magma.gi:190
#I  immediate: IsTrivial at GAPROOT/lib/magma.gi:124

@fingolfin fingolfin added the kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements label Apr 22, 2018
Copy link
Contributor

@hulpke hulpke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very useful!

@fingolfin fingolfin force-pushed the mh/trace-imm branch 2 times, most recently from 3428047 to 6d3fff5 Compare April 23, 2018 06:31
@codecov
Copy link

codecov bot commented Apr 23, 2018

Codecov Report

Merging #2384 into master will decrease coverage by 0.17%.
The diff coverage is 56.48%.

@@            Coverage Diff             @@
##           master    #2384      +/-   ##
==========================================
- Coverage   73.69%   73.52%   -0.18%     
==========================================
  Files         484      440      -44     
  Lines      245670   224026   -21644     
==========================================
- Hits       181042   164707   -16335     
+ Misses      64628    59319    -5309
Impacted Files Coverage Δ
lib/oper.g 78.71% <ø> (-2.55%) ⬇️
src/c_oper1.c 89.51% <56.48%> (-1.97%) ⬇️
hpcgap/src/c_oper1.c 0.11% <0%> (-89.01%) ⬇️
src/modules.h 33.33% <0%> (-66.67%) ⬇️
src/hookintrprtr.h 50% <0%> (-50%) ⬇️
src/fibhash.h 66.66% <0%> (-33.34%) ⬇️
src/gvars.h 66.66% <0%> (-33.34%) ⬇️
src/calls.h 65.95% <0%> (-29.79%) ⬇️
src/gasman.h 70.37% <0%> (-19.63%) ⬇️
lib/files.gi 27.04% <0%> (-17.63%) ⬇️
... and 158 more

For now, we print the location of the *method*. Ideally, we should
instead track the location of the InstallImmediateMethod call. See also
issue gap-system#2239.

Before:

    gap> TraceImmediateMethods( );
    gap> g:= Group( (1,2,3), (1,2) );;
    #I  immediate: Size
    #I  immediate: IsCyclic
    #I  immediate: IsCommutative
    #I  immediate: IsTrivial

After:

    gap> TraceImmediateMethods( );
    gap> g:= Group( (1,2,3), (1,2) );;
    #I RunImmediateMethods
    #I  immediate: Size at GAPROOT/lib/coll.gi:174
    #I  immediate: IsCyclic at GAPROOT/lib/grp.gi:34
    #I  immediate: IsCommutative at GAPROOT/lib/magma.gi:190
    #I  immediate: IsTrivial at GAPROOT/lib/magma.gi:124
@fingolfin
Copy link
Member Author

I actually decided to one up this, and fully resolve issue #2239, too, which is now in PR #2393

@fingolfin fingolfin closed this Apr 23, 2018
@fingolfin fingolfin deleted the mh/trace-imm branch April 23, 2018 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants