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

0001-Add Profiling command interface #152

Closed
derselbst opened this issue Feb 24, 2016 · 12 comments
Closed

0001-Add Profiling command interface #152

derselbst opened this issue Feb 24, 2016 · 12 comments

Comments

@derselbst
Copy link
Member

derselbst commented Feb 24, 2016

Hi,

This patch adds "profiling" commands interface for performance
measurement.
Note this patch integrates an another patch FluidVoiceOff-0001
(see ticket 153).

Please see the attached document (FluidProfile_0001.pdf) that
describes all the details.

jjc

Reported by: jjceresa

Original Ticket: fluidsynth/tickets/154

@derselbst
Copy link
Member Author

Hi,

Please, ignore FluidProfile_0001.zip and take FluidProfile_0002.zip.
FluidProfile_0001.pdf describes details.

regards

jjc

Original comment by: jjceresa

@derselbst
Copy link
Member Author

Hi,
,
This patch (see FluidProfile_0003.zip) integrates a corrected patch FluidVoiceOff-0002
(see ticket 153).
.
FluidProfile_0003.pdf describes details.

regards

jjc

Original comment by: jjceresa

@derselbst
Copy link
Member Author

FluidProfile_0003.zip

@derselbst
Copy link
Member Author

@derselbst derselbst modified the milestones: 2.0, 2.0-post Dec 29, 2017
@jjceresa
Copy link
Collaborator

0001-applied-jjc-s-profile-patch.txt

I'am not yet familiar with git. This file look like the output of git format-patch. Starting from the jjc's patch, which steps have you done to get this file ?

Another general question about git. Assuming some commits (....ca cb cc cd) in a branch , cd been the most recent commit . Did you kown any way to get some commit merged in one commit ?. For example (ce = cb + cc + cd) resulting in a shorter commit history (ca ce) ?.

Thanks.

@derselbst
Copy link
Member Author

The most difficult part was to port the filepaths of your fluid_profile.patch-0003 from windows to unix, i.e. \ to / and to restore the file structure (fluid_cmd_1.1.6.c to fluid_cmd.c).

Having this done it was basically as far as I remember:

git checkout v1.1.6
cat fluid_profile.patch-0003 | patch -p1
# patch applied to working copy
# now just make a commit as usual
git commit -a -m "applied jjc's profile patch"
# and as git to create a proper patch from this last commit
git format-patch -1

Did you kown any way to get some commit merged in one commit ?.

This specific process is known as squashing, which is usually achieved with git's interactive rebase tool git rebase -i. You have to be careful with this tool, you may only use it for branches that you have not pushed yet. Otherwise you would need to forcefully push the branch, which you however should avoid as it may end up in a huge mess for other git users.

The best practice is to make your commits properly right from the beginning. I know this is hard and not always possible (see my mess in the iir2 branch). In such cases the whole commit history will simply be squashed when merging into master, so dont worry too much.

@jjceresa
Copy link
Collaborator

Having this done it was basically as far as I remember:

Thanks.
So the things to remember should be:

  • Making use of unix patch command when a unix diff command was used.
  • And on the git side, making use of git apply when a git format-patch was used.

This specific process is known as squashing, which is usually achieved with git's interactive rebase tool git rebase -i. You have to be careful with this tool, ....as it may end up in a huge mess for other git users.

Yes, this process could produces incoherent commit history an should only be use on local branch never intended to be shared with distant git users. i am aware of this.

I was thinking of this for a special local use. For example let local commits: ca cb cc cd (cd been the most recent). Now the need is to get a patch (in git-format format) which would be the result of a git diff between commit cd and commit ca in only one patch file. I know that in this case the command git format-path will produce many.patchfiles. In this use case the need would be to get only one patch. I don't know if git format-patch is able to merge theses patch files, so i was thinking about merging commit before invoking git format-patch. You had probably need of this kind of things ?
Again thanks

@derselbst
Copy link
Member Author

So the things to remember should be:

Yes. Alternatively git am works pretty much like apply.

git diff between commit cdand commit ca in only one patch file.

Not sure if/how it's possible with format-patch, but this should work:

git diff ca cd > test.diff

@jjceresa
Copy link
Collaborator

Thanks for the infos.

@jjceresa
Copy link
Collaborator

jjceresa commented Feb 5, 2018

I have a bit of linux code intended for a profiling patch update , but i don't have a linux machine near me.
The test code is a very simple console application. I wonder if you would kindly compile , run and return
the result you see ?.
Many thanks.

Test_keyboard_linux.txt

@derselbst
Copy link
Member Author

derselbst commented Feb 5, 2018 via email

@jjceresa
Copy link
Collaborator

jjceresa commented Mar 2, 2018

This patch adds "profiling" commands interface for performance measurement for fluidsynth version v2.0.

Please see FluidProfile_0004.pdf for details.

derselbst pushed a commit that referenced this issue Mar 3, 2018
This patch adds "profiling" commands interface for performance measurement.
addresses #152
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants