Bug 2520 - option to control to do merge or not
Summary: option to control to do merge or not
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Li Guanglei
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-06 04:19 UTC by Gui,Jian
Modified: 2006-05-09 14:40 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gui,Jian 2006-04-06 04:19:51 UTC
In some cases, I don't want systemtap to merge pre-cpu files into
a single "probe.out", e.g. in binary tracing, or when large 
pre-cpu files are huge. But if I patch the stpd code to do this,
I'll lost the merge ability in all cases.

I found "-m" option has been implemented in stpd, but it is 
never been used by stap. I think it is necessary to add such an 
option to stap.
Comment 1 Gui,Jian 2006-04-07 02:32:23 UTC
Furthermore, when this option is given, could do:
* use "-m" option to invoke stpd
* add a macro such as "#define NO_MERGE" into C module file, to 
  inform the runtime print facility not to generate unnecessary 
  data such as sequence id
Comment 2 Thang Nguyen 2006-05-07 08:35:29 UTC
(In reply to comment #1)
> Furthermore, when this option is given, could do:
> * use "-m" option to invoke stpd
> * add a macro such as "#define NO_MERGE" into C module file, to 
>   inform the runtime print facility not to generate unnecessary 
>   data such as sequence id

I am modifying stap to add option "-m" for stpd.  Can you give me a specific 
example how to create non merged output files?  I tried to run stpd alone, but 
I always get a merged output file regardless of having option "-m" or not.  I 
also tried to vary the buffer size (option -b), but did not find any 
difference. 

/root/systemtap_src/src/stpd -m -o probe.out stap_32086.ko  

Which probe/condition you used that can illustrate this behavior?
Pls let me know.



Comment 3 Gui,Jian 2006-05-08 04:29:11 UTC
(In reply to comment #2)
> I am modifying stap to add option "-m" for stpd.  Can you give me a specific 
> example how to create non merged output files?  I tried to run stpd alone, 
but 
> I always get a merged output file regardless of having option "-m" or not.  
I 
> also tried to vary the buffer size (option -b), but did not find any 
> difference. 
Sorry, it seems I misunderstood "-m" option for stpd.
I always generate un-merged result files using the following patch:

diff -Nur src.old/runtime/stpd/stpd.c src/runtime/stpd/stpd.c
--- src.old/runtime/stpd/stpd.c 2006-05-08 04:20:38.000000000 -0400
+++ src/runtime/stpd/stpd.c     2006-05-08 04:21:00.000000000 -0400
@@ -35,7 +35,7 @@

 int print_only = 0;
 int quiet = 0;
-int merge = 1;
+int merge = 0;
 int verbose = 0;
 int enable_relayfs = 1;
 int target_pid = 0;
Comment 4 Li Guanglei 2006-05-09 09:35:24 UTC
patch committed.
Comment 5 Li Guanglei 2006-05-09 09:44:13 UTC
> I am modifying stap to add option "-m" for stpd.  Can you give me a specific 
> example how to create non merged output files?  I tried to run stpd alone, but 
> I always get a merged output file regardless of having option "-m" or not.  I 
> also tried to vary the buffer size (option -b), but did not find any 
> difference. 
> 
> /root/systemtap_src/src/stpd -m -o probe.out stap_32086.ko  
> 
> Which probe/condition you used that can illustrate this behavior?
> Pls let me know.

preventing stpd from merging per-cpu files is only valid for bulk (relayfs)
mode. It's meaningful for those large volumn probe data.

I committed the patch for this bug since our team is blocked by this bug.
Comment 6 Thang Nguyen 2006-05-09 14:40:06 UTC
(In reply to comment #5)
> > I am modifying stap to add option "-m" for stpd.  Can you give me a 
specific 
> > example how to create non merged output files?  I tried to run stpd alone, 
but 
> > I always get a merged output file regardless of having option "-m" or 
not.  I 
> > also tried to vary the buffer size (option -b), but did not find any 
> > difference. 
> > 
> > /root/systemtap_src/src/stpd -m -o probe.out stap_32086.ko  
> > 
> > Which probe/condition you used that can illustrate this behavior?
> > Pls let me know.
> preventing stpd from merging per-cpu files is only valid for bulk (relayfs)
> mode. It's meaningful for those large volumn probe data.
> I committed the patch for this bug since our team is blocked by this bug.


Sure. thanks for the info.